|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
(VB.Net) How do I call an external program?
I'm writing a simple, console VB.Net program, and I can't seem to get it to run other programs from within it.
I've been reading up on the question, and most people suggest either calling Shell from the Microsoft.VisualBasic.Compatibility namespace, or calling System.Diagnostics.Process.Start("Program to execute"). I can't seem to get either approach to work. I've got a skeleton program (just a module declaration with sub main in it) written to try to test it, but I can't get it to work. Could someone explain to me how to do this? |
|
#2
|
|||
|
|||
|
Hi,
If you have found the answer to your question then it would be great if you could share it with me. Thanks, Jasdeep Quote:
|
|
#3
|
|||
|
|||
|
Try using Shell("c:\windows\notepad.exe"). The Shell function still exists in VB.NET. I just had to solve this problem myself. You put the path of the program as the arguement.
If you're looking for Mulithreading try looking up Asynchronous Programming in the MSDN. I haven't actually done any multi threading with VB.NET yet. |
|
#4
|
|||
|
|||
|
Dim myprocess as new System.Diagnostics.Process()
myprocess.startinfo.filename = "c:\somepath\processname.exe" myprocess.startinfo.Arguments = "/someargument" myprocess.start The myprocess.startinfo.arguments is optional, and if you google the system.diagnostics.process.startinfo namespace you'll find all sorts of other functionality you can incorporate into your external process manipulation. Hope that helps. "my app did WHAT!?" - co-worker and friend Quote:
|
![]() |
| Viewing: ASP Free Forums > Programming > .NET Development > (VB.Net) How do I call an external program? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|