Questo sito utilizza cookies solo per scopi di autenticazione sul sito e nient'altro. Nessuna informazione personale viene tracciata. Leggi l'informativa sui cookies.
Username: Password: oppure
Visualizzatore  di immagini - Form1.frm

Form1.frm

Caricato da: Albertking82
Scarica il programma completo

  1. Dim i As Integer
  2. Public num As Integer
  3. Dim path As String
  4.  Const ngif = 58
  5.  
  6. Public Sub gif(n As Integer)
  7. If n > ngif Or n < 1 Then
  8.   MsgBox "Gif non presente", vbInformation, "Ricerca errata"
  9. Else
  10.     If n Mod 2 = 0 Then
  11.       imggif.Picture = LoadPicture(path & n & ".JPG")
  12.       Lblgif.Caption = "JPEG numero " & n
  13.     Else
  14.      imggif.Picture = LoadPicture(path & n & ".gif")
  15.      Lblgif.Caption = "Gif numero " & n
  16.     End If
  17. End If
  18. End Sub
  19. Private Sub Cmdfirst_Click()
  20. num = 1
  21. If num Mod 2 = 0 Then
  22. imggif.Picture = LoadPicture(path & num & ".jpg")
  23. Lblgif.Caption = "JPEG numero " & num
  24. Else
  25. imggif.Picture = LoadPicture(path & num & ".gif")
  26. Lblgif.Caption = "Gif numero " & num
  27. End If
  28. End Sub
  29.  
  30. Private Sub Cmdlast_Click()
  31. num = ngif
  32. If num Mod 2 = 0 Then
  33. imggif.Picture = LoadPicture(path & num & ".jpg")
  34. Lblgif.Caption = "JPEG numero " & num
  35. Else
  36. imggif.Picture = LoadPicture(path & num & ".gif")
  37. Lblgif.Caption = "Gif numero " & num
  38. End If
  39. End Sub
  40.  
  41. Private Sub Cmdless_Click()
  42. If Opt1.Value = True Then
  43. If num - 1 >= 1 Then
  44. num = num - 1
  45. End If
  46. End If
  47. If Opt5.Value = True Then
  48. If num - 5 >= 1 Then
  49. num = num - 5
  50. End If
  51. End If
  52. If Opt10.Value = True Then
  53. If num - 10 >= 1 Then
  54. num = num - 10
  55. End If
  56. End If
  57. If num Mod 2 = 0 Then
  58. imggif.Picture = LoadPicture(path & num & ".jpg")
  59. Lblgif.Caption = "JPEG numero " & num
  60. Else
  61. imggif.Picture = LoadPicture(path & num & ".gif")
  62. Lblgif.Caption = "Gif numero " & num
  63. End If
  64. End Sub
  65.  
  66. Private Sub Cmdplus_Click()
  67. If Opt1.Value = True Then
  68. If num + 1 <= ngif Then
  69. num = num + 1
  70. End If
  71. End If
  72. If Opt5.Value = True Then
  73. If num + 5 <= ngif Then
  74. num = num + 5
  75. End If
  76. End If
  77. If Opt10.Value = True Then
  78. If num + 10 <= ngif Then
  79. num = num + 10
  80. End If
  81. End If
  82. If num Mod 2 = 0 Then
  83. imggif.Picture = LoadPicture(path & num & ".jpg")
  84. Lblgif.Caption = "JPEG numero " & num
  85. Else
  86. imggif.Picture = LoadPicture(path & num & ".gif")
  87. Lblgif.Caption = "Gif numero " & num
  88. End If
  89. End Sub
  90.  
  91. Private Sub Command1_Click()
  92. Form2.Show
  93. End Sub
  94. Private Sub Form_Load()
  95. Label2.Caption = ngif & " immagini presenti nell'archivio"
  96. num = 1
  97. path = App.path & "\"
  98. imggif.Picture = LoadPicture(path & num & ".gif")
  99. Lblgif.Caption = "Gif numero " & num
  100. End Sub