Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I'm trying to setup a menu driven a

Status
Not open for further replies.

SBTBILL

Programmer
May 1, 2000
515
0
0
US
I'm trying to setup a menu driven app. I want the main module to just call other .vb programs some of which will accept criteria and call another .vb program to display requested data. I can get a window to pop up using filename.showdialog but it is always empty. I'm using showdialog to get a modal screen.
 
You are looking for System.Process.

System.Process.Start - starts a process (i.e., runs an exe). You can pass parameters to the process.

Here's an example:

Dim ProcProperties As New ProcessStartInfo
ProcProperties.FileName = "notepad"
ProcProperties.Arguments = "TextFile.txt"
ProcProperties.WindowStyle = ProcessWindowStyle.Maximized
Dim Proc As Process = Process.Start(ProcProperties)

To make your program pause until the process is complete:

Dim ProcProperties As New ProcessStartInfo
ProcProperties.FileName = "notepad"
ProcProperties.Arguments = "TextFile.txt"
ProcProperties.WindowStyle = ProcessWindowStyle.Maximized
Dim Proc As Process = Process.Start(ProcProperties)
[red]Proc.WaitForExit()[/red]

I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson

Arrrr, mateys! Ye needs ta be preparin' yerselves fer Talk Like a Pirate Day!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top