cs_breton51
Messages postés76Date d'inscriptionjeudi 21 avril 2005StatutMembreDernière intervention15 novembre 2018 6 déc. 2010 à 18:27
utilise la class process()
Public Sub execute_ligne(ByVal chemin_et_exe As String, Optional ByVal argument As String = Nothing)
Try
Dim monProcess As New Process()
monProcess.StartInfo.FileName = chemin_et_exe
If argument <> Nothing Then
monProcess.StartInfo.Arguments = argument
End If
monProcess.Start()
monProcess.Close()
Catch ex As Exception
'traitement en cas d'érreur
End Try
End Sub
lediablo
Messages postés214Date d'inscriptionmercredi 26 avril 2006StatutMembreDernière intervention 2 août 2012 13 déc. 2010 à 17:09
exemple shelexecute:
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Private Sub Command1_Click()
ShellExecute 0, "Open", "C:\test.exe a -r -ep1 -v", vbNullString, vbNullString,vbHidden
End Sub
Quand on pose une question on est con 5 minutes,Quand on ne la pose pas on le reste toute sa vie (mon site)