Processes

A process is a small program that can run on a computer.
It can own resources (memory, device handlers, sockets etc)
A process is usually an executable file that does not share resources.
An application is loaded into its own process.


System.Diagnostics.Process

You can start a process by calling the Start method and passing in the name of the executable file as an argument.

System.Diagnostics.Process notepad_process; 
System.Diagnostics.Process excel_process;

notepad_process = System.Diagnostics.Process.Start("notepad.exe");
excel_process = System.Diagnostics.Process.Start("excel.exe");

System.Threading.Thread.Sleep(10000); //wait for 10 seconds

notepad_process.CloseMainWindow();
excel_process.CloseMainWindow();



© 2020 Better Solutions Limited. All Rights Reserved. © 2020 Better Solutions Limited TopPrevNext