|
Hi
Use this script to initialize a dos program:
Dim myprocess As New Process
Dim StartInfo As New System.Diagnostics.ProcessStartInfo
Public Sub Audio128(ByVal MyPathandFilename As String, ByVal MyFileName As String)
StartInfo.FileName = MyProgram.exe
StartInfo.RedirectStandardInput = True
StartInfo.RedirectStandardOutput = True
StartInfo.UseShellExecute = False
myprocess.StartInfo = StartInfo
myprocess.Start()
The script works fine but the prompt is displayed while the program EXE works.
Is possible to hide it?
Thanks in advance
|
|
|
|
|
Hi,
Try
StartInfo.WindowStyle = ProcessWindowStyle.Hidden
Hope this helps.
In some cases, my signature will be longer than my message...
<em style="color:red"> <b>ProgramFOX</b></em> ProgramFOX
|
|
|
|
|
Thank ProgramFox
I tested and does not work
It seems to have no effect
|
|
|
|
|
It won't work unless UseShellExecute is set to True, but then you lose the redirect abilities because those have to be set to False in order for the process to even launch.
You can't hide the window if you're going to redirect the streams.
|
|
|
|
|
Try setting the ProcessStartInfo.CreateNoWindow property. I'm suprised you didn't see this when you were browsing the documentation!
|
|
|
|