check if program is running and shows a prompt - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

check if program is running and shows a prompt

john_zakariajohn_zakaria Posts: 9Member
hi everyone

now icheck if program is running or not using this code

Process[] pname = Process.GetProcessesByName("AIM");
if (pname.Length == 0)
MessageBox.Show("nothing");
else
MessageBox.Show("run")


all that i need is to be sure that the program is closed before taking my action and shows for the user that the program AIM is already running. you must close it before completing (OK,Cancel)

and after pressing ok i will put my fuction

[b]for example:[/b]
when you install the photoshop and the program is already running it shows for you that the program is already running. you must close it before completing (OK,Cancel)


and after clicking OK .. the program will compltete instalation

Sign In or Register to comment.