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
Virtual slide - Virtual slide.frm

Virtual slide.frm

Caricato da: Albertking82
Scarica il programma completo

  1. Dim lung As Integer, stringa As String
  2.  
  3. Private Sub cartelle_Change()
  4. File.Path = cartelle.Path
  5. End Sub
  6. Private Sub cmdadd_Click()
  7.  
  8.  If File.ListIndex <> -1 Then
  9.     lung = Len(File.List(File.ListIndex))
  10.     stringa = Mid(File.List(File.ListIndex), (lung - 3), lung)
  11.   If stringa = ".jpg" Then
  12.      List1.AddItem File.List(File.ListIndex)
  13.      Command1.Enabled = True
  14.   Else
  15.      Exit Sub
  16.  End If
  17.  
  18.  If List1.List(0) = "Nessun file" Then
  19.    List1.Clear
  20.    Command1.Enabled = False
  21.  End If
  22.  
  23. End If
  24.  
  25. End Sub
  26.  
  27. Private Sub cmddel_Click()
  28. If List1.ListIndex <> -1 And List1.List(0) <> "Nessun file" Then
  29.  List1.RemoveItem (ListIndex)
  30. End If
  31. If List1.ListCount = 0 Then
  32. Command1.Enabled = False
  33. End If
  34. End Sub
  35.  
  36. Private Sub Command1_Click()
  37. frmslide.Show
  38. End Sub
  39.  
  40. Private Sub Command2_Click()
  41. If List1.ListCount > -1 Then
  42. List1.Clear
  43. Command1.Enabled = False
  44. End If
  45. End Sub
  46.  
  47. Private Sub Drive1_Change()
  48. On Error GoTo error
  49. cartelle.Path = Drive1.Drive
  50. Exit Sub
  51. error:  MsgBox Err.Description, vbCritical, "Errore"
  52. End Sub
  53.  
  54.  
  55. Private Sub File_Click()
  56.     lung = Len(File.List(File.ListIndex))
  57.     stringa = Mid(File.List(File.ListIndex), (lung - 3), lung)
  58.   If stringa = ".jpg" Then
  59.       imgant.Picture = LoadPicture(cartelle.Path & "\" & File.List(File.ListIndex))
  60.   Else
  61.      Exit Sub
  62.  End If
  63. End Sub
  64.  
  65. Private Sub File_DblClick()
  66. Call cmdadd_Click
  67. End Sub
  68.  
  69. Private Sub Form_Load()
  70. cartelle.Path = Drive1.Drive
  71. End Sub
  72.  
  73. Private Sub Form_Unload(Cancel As Integer)
  74. Unload frmset
  75. End Sub
  76.  
  77. Private Sub List1_Click()
  78.  lung = Len(List1.List(List1.ListIndex))
  79.     stringa = Mid(List1.List(List1.ListIndex), (lung - 3), lung)
  80.   If stringa = ".jpg" Then
  81.       imgant.Picture = LoadPicture(cartelle.Path & "\" & List1.List(List1.ListIndex))
  82.   Else
  83.      Exit Sub
  84.  End If
  85. End Sub
  86.  
  87. Private Sub List1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  88. If Button = 2 And List1.ListIndex > -1 And List1.List(0) <> "Nessun file" Then
  89. PopupMenu mnupop
  90. End If
  91. End Sub
  92. Private Sub mnuesci_Click()
  93. Unload frmset
  94. End
  95. End Sub
  96.  
  97. Private Sub mnurem_Click()
  98. If List1.ListIndex > -1 Then
  99. List1.RemoveItem (List1.ListIndex)
  100. End If
  101. If List1.ListCount = 0 Then
  102. Command1.Enabled = False
  103. End If
  104. End Sub
  105.  
  106. Private Sub mnuset_Click()
  107.  frmset.Visible = True
  108.  frmset.Show
  109. End Sub