Utilisation Simple des DriveListBox/FileListBox/DirListBox
Ainsi Que Méthode de Lancement d'une appli ou d'un fichier selon son extension
Source / Exemple :
'Dans Un Module
Public Declare Function ShellExecuteA Lib "shell32" (ByVal hwnd As Long, ByVal LPFile As String, ByVal PathFile As String, ByVal Other As String, ByVal Other2 As String, ByVal Param As Long) As Long
'Dans Votre Form
Option Explicit
Dim Tot As String
Private Sub Command1_Click()
Dim RetVal
RetVal = ShellExecuteA(0, "Open", Dir1.Path & "\" & File1.FileName, "", "", 10)
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label1.ForeColor = &H0&
End Sub
Private Sub Label1_Click()
Label1.ForeColor = &HFF&
Shell ("c:\Program Files\Internet Explorer\IEXPLORE.EXE http://perso.wanadoo.fr/crazydoub")
End Sub
Private Sub Label1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label1.ForeColor = &HFF&
End Sub
Private Sub Timer1_Timer()
If Len(Dir1.Path) < 5 Then Tot = Dir1.Path & File1.FileName
If Len(Dir1.Path) > 5 Then Tot = Dir1.Path & "\" & File1.FileName
Text1.Text = Tot
Dir1.Path = Drive1.Drive
File1.Path = Dir1.Path
Text2.Text = Len(Dir1.Path)
DirPathShell.Caption = Tot & " - " & "Cliquez Sur Executer"
End Sub
Conclusion :
Tout est expliqué le code est très clair
Vous n'êtes pas encore membre ?
inscrivez-vous, c'est gratuit et ça prend moins d'une minute !
Les membres obtiennent plus de réponses que les utilisateurs anonymes.
Le fait d'être membre vous permet d'avoir un suivi détaillé de vos demandes et codes sources.
Le fait d'être membre vous permet d'avoir des options supplémentaires.