Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Run notepad.exe
Message
From
22/02/2006 09:42:20
 
 
To
21/02/2006 17:31:22
General information
Forum:
ASP.NET
Category:
Other
Title:
Miscellaneous
Thread ID:
01097929
Message ID:
01098098
Views:
26
This message has been marked as the solution to the initial question of the thread.
To wait for Notepad to finish you need to remember to call the waitforexit method of the process you started. You can also set window size etc using System.Diagnostics.ProcessStartInfo.
 '   
    ' Start a new process (Notepad).
    '
    Dim myProcess As Process = System.Diagnostics.Process.Start("MyTextFile.txt")
    '
    ' Wait until it ends.
    '
    myProcess.WaitForExit()
    
    MessageBox.Show("Notepad ended: " & myProcess.ExitTime & "." & _
        System.Environment.NewLine & "Exit Code: " & myProcess.ExitCode)
    '
    ' Close the process to free resources.
    '
    myProcess.Close()
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform