Process.Start("toto.txt"), le programme va demander à Windows d'ouvrir le fichier toto.txt avec l'application par défaut associée à l'extension .txt (souvent notepad)
Process.Start("C:\...\Word.exe", "toto.txt"), alors le programme va demander à Windows de lancer word et d'ouvrir le fichier avec.
Process.Start(True), ici l'argument est un bool.
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionFor Each file As ListViewItem In Lv1.Itemsle message es sa ce niveau la :
Dim filePath As String = file.SubItems(1).Text & "\" & file.Text
If file.Selected = True Then
If DialogResult.Yes Then
Process.Start(filePath)
ElseIf DialogResult.No Then
End If
End If
Next
Dim lvi As ListViewItem = Lv1.HitTest(e.Location).Item
If lvi IsNot Nothing Then
Process.Start(lvi.SubItems(1).Text)
End If
Process.Start(filePath)
Private Sub Lv1_MouseDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Lv1.MouseDoubleClick
For Each file As ListViewItem In Lv1.Items
Dim filePath As String = file.SubItems(1).Text & "\" & file.Text
If file.Selected = True Then
If DialogResult.Yes Then
Process.Start(filePath)*
ElseIf DialogResult.No Then
End If
End If
Next
Dim lvi As ListViewItem = Lv1.HitTest(e.Location).Item
If lvi IsNot Nothing Then
Process.Start(lvi.SubItems(1).Text)
End If
End Sub
je l'ai déja mis plus hautCe n'est pas ça qu'a demandé Whism.
peux tu mettre le contenu des tes variables quand l'apllication bugue (filePath, file.SubItems(1).Text, file.Text, etc...)
je vient de test sa ne marche pas toi ce que tu me dit de faire c'est d'ouvrir en gros un explorateur ce que je ne veux pas
DIm directory as String = "c:\\tmp\\" Dim fichier as String= "toto.txt" Dim filepath as String= directory & fichier process.start(filePath).....marchera..