Checking If Processes Are Running

  • Thread starter Thread starter Jonathan Prior
  • Start date Start date
J

Jonathan Prior

Can Anybody tell me if there is a way to check if an
application is running that is only displayed within the
processes menu Of Task Manager and not applications.

I want to write it within either vb6 or .net standard.


Any Help would be much appreciated
Regards Jonny
 
Hello,

Jonathan Prior said:
Can Anybody tell me if there is a way to check if an
application is running that is only displayed within the
processes menu Of Task Manager and not applications.

I want to write it within either vb6 or .net standard.

Have a look at the class 'System.Diagnostics.Process' and its methods
'GetProcesses', 'GetProcessesByName' etc.
 
If
UBound(Diagnostics.Process.GetProcessesByName(Diagnostics.Process.GetCurrent
Process.ProcessName)) > 0 Then

MessageBox.Show("Process running", "Message", MessageBoxButtons.OK,
MessageBoxIcon.Warning)

else

MessageBox.Show("Process not running", "Message", MessageBoxButtons.OK,
MessageBoxIcon.Warning)

End

End If
 
Hello,

[Code to check if process is already running]

This will not work in all situations because there can be more than one
application with the same name. You may want to compare the file names of
the processes too.
 
Back
Top