Impossible de faire exécuter le fichier trans.bat de la commande2.
Je vais directement Selec1.Show
Je voir pas l'erreur que j'ai fais.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 Const SPI_SCREENSAVERRUNNING = 97 Private Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long, ByVal lpvParam As Any, ByVal fuWinIni As Long) As Long Private Sub Form_Load() Call SystemParametersInfo(SPI_SCREENSAVERRUNNING, True, "1", 0) End Sub Private Sub Command1_Click() Dim ret As Long On Error Resume Next ret = Shell("c:\Program files\YP30H\YP30H.exe", vbNormaldFocus) End Sub Private Sub Command2_Click() Dim ret As Long On Error Resume Next ret = Shell("c:\trans.bat", vbNormaldFocus) Selec1.Show End Sub
Le Shell de Command1 fonctionne sans problème.
Merci de votre aide
Partager