I am relativly new to vb.net ..... heck I'm new to
VB in any version. So I
apologize if this is overly dumb.
I am trying to start and stop a particular file
using the process.start()
and process.kill().
These are working but the DOS window is always
appearing.
What am I missing to hide the DOS window?
I have tried .hidden, .minimized, removed the
window style completeley. I
haven't found a way to hide the DOS window.
Any help is appreciated.
Dim mProcess As Process
Private Sub Form1_Load(ByVal sender As Object,
ByVal e As System.EventArgs)
Handles MyBase.Load
mProcess = New Process
With mProcess.StartInfo
..FileName = "repstore.exe"
..Arguments = "3104"
..UseShellExecute = False
..WindowStyle = ProcessWindowStyle.Hidden
..RedirectStandardOutput = True
..RedirectStandardInput = True
End With
End Sub
Private Sub btnStart_Click(ByVal sender As
System.Object, ByVal e As
System.EventArgs) Handles btnStart.Click
mProcess.Start()
End Sub
Private Sub btnStop_Click(ByVal sender As
Object, ByVal e As
System.EventArgs) Handles btnStop.Click
mProcess.Kill()
End Sub
I am relativly new to vb.net ..... heck I'm new to
VB in any version. So I
apologize if this is overly dumb.
I am trying to start and stop a particular file
using the process.start()
and process.kill().
These are working but the DOS window is always
appearing.
What am I missing to hide the DOS window?
I have tried .hidden, .minimized, removed the
window style completeley. I
haven't found a way to hide the DOS window.
Any help is appreciated.
Dim mProcess As Process
Private Sub Form1_Load(ByVal sender As Object,
ByVal e As System.EventArgs)
Handles MyBase.Load
mProcess = New Process
With mProcess.StartInfo
..FileName = "repstore.exe"
..Arguments = "3104"
..UseShellExecute = False
..WindowStyle = ProcessWindowStyle.Hidden
..RedirectStandardOutput = True
..RedirectStandardInput = True
End With
End Sub
Private Sub btnStart_Click(ByVal sender As
System.Object, ByVal e As
System.EventArgs) Handles btnStart.Click
mProcess.Start()
End Sub
Private Sub btnStop_Click(ByVal sender As
Object, ByVal e As
System.EventArgs) Handles btnStop.Click
mProcess.Kill()
End Sub
[edit]Code block added - OriginalGriff[/edit]