Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

Cacher une fenêtre dos

4 réponses
Avatar
Sylvain MALLEVAL
salut, je lance un processus dos avec la commande
Dim Pro As Process =
System.Diagnostics.Process.Start(Application.StartupPath &
"\faxinstall.exe")

Comment faire pour cacher la fenêtre dos. Est ce que c possible ???

Merci



Sylvain

4 réponses

Avatar
Zoury
Salut Sylvain!

Emploi la classe ProcessStartInfo pour lancer le processus.

Ex :
'***
Dim psi As ProcessStartInfo
psi = New ProcessStartInfo(Application.StartupPath & "faxinstall.exe")
psi.WindowStyle = ProcessWindowStyle.Hidden
Process.Start(psi)
'***

--
Cordialement
Yanick
MVP pour Visual Basic
Avatar
Sylvain MALLEVAL
MErci...
avec mon process, pour bloquer l'exécution jusqu'à la fin, je fait ainsi
Dim Pro As Process =
System.Diagnostics.Process.Start(Application.StartupPath & "faxinstall.exe)

While Pro.HasExited = False : Application.DoEvents() : End While

Pro.Close() : Pro.Dispose() : Pro = Nothing

comment faire avec le psi ????



Mezrci

Sylvain

"Zoury" <yanick_lefebvre at hotmail dot com> a écrit dans le message de
news:
Salut Sylvain!

Emploi la classe ProcessStartInfo pour lancer le processus.

Ex :
'***
Dim psi As ProcessStartInfo
psi = New ProcessStartInfo(Application.StartupPath & "faxinstall.exe")
psi.WindowStyle = ProcessWindowStyle.Hidden
Process.Start(psi)
'***

--
Cordialement
Yanick
MVP pour Visual Basic




Avatar
Zoury
le psi ne sert qu'à lancer le Process. Tu ensuite utiliser l'objet Process
qui t'es retourné de la même façon qu'auparavant :
'***
Dim psi As ProcessStartInfo
Dim pro As Process

psi = New ProcessStartInfo(Application.StartupPath & "faxinstall.exe")
psi.WindowStyle = ProcessWindowStyle.Hidden
pro = Process.Start(psi)

While Not pro.HasExited
Application.DoEvents()
End While

pro.Close()
pro.Dispose()
pro = Nothing
'***

--
Cordialement
Yanick
MVP pour Visual Basic
"Sylvain MALLEVAL" <devbnet@[antispam]free.fr> a écrit dans le message de
news:
MErci...
avec mon process, pour bloquer l'exécution jusqu'à la fin, je fait ainsi
Dim Pro As Process > System.Diagnostics.Process.Start(Application.StartupPath &


"faxinstall.exe)

While Pro.HasExited = False : Application.DoEvents() : End While

Pro.Close() : Pro.Dispose() : Pro = Nothing

comment faire avec le psi ????



Mezrci

Sylvain

"Zoury" <yanick_lefebvre at hotmail dot com> a écrit dans le message de
news:
> Salut Sylvain!
>
> Emploi la classe ProcessStartInfo pour lancer le processus.
>
> Ex :
> '***
> Dim psi As ProcessStartInfo
> psi = New ProcessStartInfo(Application.StartupPath & "faxinstall.exe")
> psi.WindowStyle = ProcessWindowStyle.Hidden
> Process.Start(psi)
> '***
>
> --
> Cordialement
> Yanick
> MVP pour Visual Basic
>
>




Avatar
Sylvain MALLEVAL
ok, c kool, merci bcp, c'est ce qu'il me fallait
Sylvain

"Zoury" <yanick_lefebvre at hotmail dot com> a écrit dans le message de
news: %
le psi ne sert qu'à lancer le Process. Tu ensuite utiliser l'objet Process
qui t'es retourné de la même façon qu'auparavant :
'***
Dim psi As ProcessStartInfo
Dim pro As Process

psi = New ProcessStartInfo(Application.StartupPath & "faxinstall.exe")
psi.WindowStyle = ProcessWindowStyle.Hidden
pro = Process.Start(psi)

While Not pro.HasExited
Application.DoEvents()
End While

pro.Close()
pro.Dispose()
pro = Nothing
'***

--
Cordialement
Yanick
MVP pour Visual Basic
"Sylvain MALLEVAL" <devbnet@[antispam]free.fr> a écrit dans le message de
news:
MErci...
avec mon process, pour bloquer l'exécution jusqu'à la fin, je fait ainsi
Dim Pro As Process >> System.Diagnostics.Process.Start(Application.StartupPath &


"faxinstall.exe)

While Pro.HasExited = False : Application.DoEvents() : End While

Pro.Close() : Pro.Dispose() : Pro = Nothing

comment faire avec le psi ????



Mezrci

Sylvain

"Zoury" <yanick_lefebvre at hotmail dot com> a écrit dans le message de
news:
> Salut Sylvain!
>
> Emploi la classe ProcessStartInfo pour lancer le processus.
>
> Ex :
> '***
> Dim psi As ProcessStartInfo
> psi = New ProcessStartInfo(Application.StartupPath & "faxinstall.exe")
> psi.WindowStyle = ProcessWindowStyle.Hidden
> Process.Start(psi)
> '***
>
> --
> Cordialement
> Yanick
> MVP pour Visual Basic
>
>