C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




Start a process and wait until it exits


Posted Date: 01 Mar 2007    Resource Type: Code Snippets    Category: Process

Posted By: Tony John       Member Level: Gold
Rating:     Points: 10



This VB.NET sample shows how to launch another process or program from your VB.NET application and wait until the launched program exits.


Dim info As New System.Diagnostics.ProcessStartInfo

' Open the notepad application
info.FileName = "c:\windows\notepad.exe"

' Pass a text file name so that notepad will open it
info.Arguments = "c:\MyFile.txt"

Dim process As New System.Diagnostics.Process
process.StartInfo = info

' Start the process (notepad)
process.Start()

' Wait until the process started is finished (close notepad)
process.WaitForExit()

' Release the resources
process.Close()




Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
(No tags found.)

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Open a URL in Internet Explorer using Process.Start
Previous Resource: Find Memory usage and CPU usage
Return to Discussion Resource Index
Post New Resource
Category: Process


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design

it outsourcing

Contact Us    Privacy Policy    Terms Of Use