With OpenFileDialog1 .Title = "Choisir" 'titre .InitialDirectory = "D:" 'répertoire initial .Filter = "Fichier(exe)|*.exe" 'filtrer par les .exe End With If OpenFileDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then 'code à être exécuté End If
Dim OpenFileDialog1 As New OpenFileDialog() With OpenFileDialog1 ... ... End With
If OpenFileDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then Process.Start(OpenFileDialog1.SafeFileName) End If
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionDim OpenFileDialog1 As OpenFileDialog With OpenFileDialog1() .Title = "Choisir" 'titre .InitialDirectory = "C:" 'répertoire initial .Filter = "Fichier(exe)|*.exe" 'filtrer par les .exe End With If OpenFileDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then 'code à être exécuté End If