- 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 Declare Function GetTickCount Lib "kernel32" () As Long
- Private Sub C1_Click()
- End
- End Sub
- Private Sub Form_Activate()
- Caption= "Lancement automatique"
- Tps=30
- T = GetTickCount()
- Do While T + ((Tps+0.1) * 1000) > GetTickCount()
- DoEvents
- L1.Caption = Tps - Int((GetTickCount() - T) / 1000)
- Loop
- ShellExecute hwnd, "Open", "Chemin de l'executable à lancer (adresse complète)", ByVal 0&, 0&, SW_Normal
- End
- End Sub
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 Declare Function GetTickCount Lib "kernel32" () As Long
Private Sub C1_Click()
End
End Sub
Private Sub Form_Activate()
Caption= "Lancement automatique"
Tps=30
T = GetTickCount()
Do While T + ((Tps+0.1) * 1000) > GetTickCount()
DoEvents
L1.Caption = Tps - Int((GetTickCount() - T) / 1000)
Loop
ShellExecute hwnd, "Open", "Chemin de l'executable à lancer (adresse complète)", ByVal 0&, 0&, SW_Normal
End
End Sub