![]() |
|
|
|
| ||||||
|
Welcome to the The ProgrammersTalk Community forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
![]() |
![]() | | LinkBack | Thread Tools | Display Modes | ![]() |
| |||
| Linking independent programs Hello everyone. I'm new to this whole thing. Have been programming on my own for some time so I really don't know the formal lingo. Presently, I'm learning Visual Studio 2005. Quite a jump. Does anyone know how to run a program from the existing program. I used to use the Run command. Found the Application.Run(filename) but I get a blue line when I type in the file name. Thanks. |
| |
| |||
| Just launching the app on button1 click: Code: Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button1.Click
System.Diagnostics.Process.Start("C:\listfiles.bat")
End Sub Code: Private Sub Button2_Click(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles Button2.Click
Dim psi As New _
System.Diagnostics.ProcessStartInfo("C:\listfiles.bat")
psi.RedirectStandardOutput = True
psi.WindowStyle = ProcessWindowStyle.Hidden
psi.UseShellExecute = False
Dim listFiles As System.Diagnostics.Process
listFiles = System.Diagnostics.Process.Start(psi)
Dim myOutput As System.IO.StreamReader _
= listFiles.StandardOutput
listFiles.WaitForExit(2000)
If listFiles.HasExited Then
Dim output As String = myOutput.ReadToEnd
Debug.WriteLine(output)
End If
End Sub __________________ Day Cares | Golf Courses | Disc Golf Courses | Campgrounds | Ice Rinks | Paintball Fields | Dentists | Plastic Surgeons | Aging Jokes Catholic Churches | Lutheran Churches | Methodist Churches | Episcopal Churches | Clean Jokes |
| The Following User Says Thank You to ccoonen For This Useful Post: | ||
TeraTask (12-30-2007) | ||
![]() |
| Thread Tools | |
| Display Modes | |
| |