How to open the Game file through VB.NET

Hi

I have one Game project EXE file,i want to open the Game through that EXE file when i click a button. I tried one example with the code like as below.
System.Diagnostics.Process.Start("c:program filesStardockDrengin.netgalcivgalciv.exe")
It is working fine.The game is opened,but after one second it is turned back to code window.If you know please tell me, how can i maintained the code to run a game without turn to code window.

mamatha

Comments

  • i think you can use this after calling the exe

    ..
    SendKeys.Flush()
    ..

  • : i think you can use this after calling the exe
    :
    : ..
    : SendKeys.Flush()
    : ..
    :
    :

    I have used following 2 ways to execute exe( This exe invokes a game)
    way 1:
    Shell(path & "galciv.exe", AppWinStyle.MaximizedFocus, True, 10000)
    SendKeys.Flush()

    way 2:
    System.Diagnostics.Process.Start(path & "galciv.exe")
    SendKeys.Flush()

    Here in both ways the game is startingbut immidiately stoping and coming to end of function in the code.

    So what could be the reason for this? and how to solve this problem?
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories