Running applications on VB.NET

ambokiko

Member
Joined
Nov 9, 2006
Messages
11
Programming Experience
Beginner
is it possible to run external applications (e.g. ms paint) in VB.Net?
 
Do you mean execute an external app from your VB.NET program? If so, yes:

VB.NET:
 Dim p As New Process
        With p.StartInfo
            .UseShellExecute = True
            .FileName = "PATHTOEXECUTABLE\EXECUTABLE.EXE"
            .Arguments = "ANYARGUMENTSHERE"
        End With
        p.Start()
        p.WaitForExit() 'Only if you actually want the program to wait until that file is closed.
        p.Dispose()
 
follow-up question: can i run/launch the external application w/o it having to pop-up? what i mean is it will appear in the same form where i made my button that runs it.
 
Back
Top