Process in Visual Basic .NET
Tags: VB.NET, VB 2008, VB 2010, VB 2012, VB 2013
This lesson describes the Process control
This component provides access to the processes that run on the computer, and you can use this object to start, stop, and monitor processes.
You can also use the object to get information about a running process such as its threads, the modules it has loaded, and the amount of memory it is using.
When you add a new Process instance to the form, you set values in its StartInfo property to define the application to run.
For example, if you set the FileName property to "C:\cv.txt" and then set the Verb property to Open and then just call its Start method, the cv.txt will be opened in a notepad or another software associated with the text files.
You can set these properties programmatically as well:
Process1.StartInfo.FileName = "C:\cv.txt" Process1.StartInfo.Verb = "Open" Process1.Start()
You can also loop through the running processes like the following:
For Each proc As Process In Process.GetProcesses Console.WriteLine(proc.ProcessName) NextPrevious Lesson | Next Lesson