Shell !! :)

scoobydoos Messages postés 64 Date d'inscription vendredi 31 mai 2002 Statut Membre Dernière intervention 28 novembre 2010 - 10 juil. 2002 à 20:00
leneuf22 Messages postés 156 Date d'inscription samedi 12 janvier 2002 Statut Membre Dernière intervention 4 mars 2003 - 11 juil. 2002 à 14:00
salut,
comment faire pour pouvoir executer n'importe quel fichier avec shell ou autre ? merci par avance

4 réponses

leneuf22 Messages postés 156 Date d'inscription samedi 12 janvier 2002 Statut Membre Dernière intervention 4 mars 2003 1
11 juil. 2002 à 00:27
Salut :)

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

const SW_HIDE = 0
const SW_MAXIMIZE = 3
const SW_MINIMIZE = 6
const SW_RESTORE = 9
const SW_SHOW = 5
const SW_SHOWDEFAULT = 10
const SW_SHOWMINIMIZED = 2
const SW_SHOWMINNOACTIVE = 7
const SW_SHOWNA = 8
const SW_SHOWNOACTIVATE = 4
const SW_SHOWNORMAL = 1

ShellExecute Me.hwnd, vbNullString, "c:\windows\bureau\fichier.txt", vbNullString, "c:\windows\bureau", SHOW_NORMAL

a++
0
Dinamouse Messages postés 1 Date d'inscription dimanche 9 juin 2002 Statut Membre Dernière intervention 11 juillet 2002
11 juil. 2002 à 00:34
******************************************
(Nom de la valeur) = Shell(Commande demande,Comment doit elle etre executer)

---> Normalement, lorsque tu tape shell, Visual Basic affiche une petite aide.

Ex de shell :
Msg = Shell("Net send " & (Nom d'un Pc) & (Message),vbHide)

ou encore

Word = Shell("winword",vbhide)
******************************************

*****************
*** Dinamouse ***
*****************
0
scoobydoos Messages postés 64 Date d'inscription vendredi 31 mai 2002 Statut Membre Dernière intervention 28 novembre 2010
11 juil. 2002 à 12:38
salut,
merci pour ta réponse, un truc que je ne comprend pas, je n'arrive pas à cacher l'application qui démarre ex : média player. comment marche tes constantes ? merci encore
0
leneuf22 Messages postés 156 Date d'inscription samedi 12 janvier 2002 Statut Membre Dernière intervention 4 mars 2003 1
11 juil. 2002 à 14:00
Tu as remplacé SHOW_NORMAL par SW_SHOWMINNOACTIVE ?
0
Rejoignez-nous