K
K.NagaKiranKumar
Hi
I have stucked up on a problem....
I am developing an application in VB.NET
Here I have to put a button on a form
and by clicking on that button, an exe should run.
see the code I am using...
------------------
Private Sub btnstartgalciv_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
btnstartgalciv.Click
Dim path As String
path = "C:\galciv\galciv.exe"
If path <> "" And mFSO.FileExists(path) Then
System.Diagnostics.Process.Start(path)
'Shell(path & "\galciv.exe",
AppWinStyle.MaximizedFocus, True, 10000)
Else
MsgBox("Galactic Civilizations is not
installed", MsgBoxStyle.Information, "Information")
End If
End Sub
------------------
In above code I have tried in both ways
1)System.Diagnostics.Process.Start(path)
2)'Shell(path & "\galciv.exe", AppWinStyle.MaximizedFocus,
True, 10000)
and also triesd to assign system.diagnosti....... to a
variable.
The problem I am facing is.....
When I click the button, The exe is starting it's
execution and immidiately terminanting its process.
Here I am trying to invoke a game by clicking a
button,placed on the form.
Plz.......reply
thanks, bye
I have stucked up on a problem....
I am developing an application in VB.NET
Here I have to put a button on a form
and by clicking on that button, an exe should run.
see the code I am using...
------------------
Private Sub btnstartgalciv_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
btnstartgalciv.Click
Dim path As String
path = "C:\galciv\galciv.exe"
If path <> "" And mFSO.FileExists(path) Then
System.Diagnostics.Process.Start(path)
'Shell(path & "\galciv.exe",
AppWinStyle.MaximizedFocus, True, 10000)
Else
MsgBox("Galactic Civilizations is not
installed", MsgBoxStyle.Information, "Information")
End If
End Sub
------------------
In above code I have tried in both ways
1)System.Diagnostics.Process.Start(path)
2)'Shell(path & "\galciv.exe", AppWinStyle.MaximizedFocus,
True, 10000)
and also triesd to assign system.diagnosti....... to a
variable.
The problem I am facing is.....
When I click the button, The exe is starting it's
execution and immidiately terminanting its process.
Here I am trying to invoke a game by clicking a
button,placed on the form.
Plz.......reply
thanks, bye