How do I know one application is opening?
Hi everyone
How could my windows service program knows one application is opening or not?. For example if i wanted to know that one person is opening windows media player or any other application in a system where I installed my windows service app. . How can it be done?
PLease help
Re: How do I know one application is opening?
hi
No is there to help me?
pleaseeeeee..
Re: How do I know one application is opening?
You can use the Process class to determine what processes are running. I suggest a bit of reading.
Re: How do I know one application is opening?
try this one.
VB Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim pro() As Process = Process.GetProcesses
For Each p As Process In pro
If p.ProcessName = "calc" Then
MessageBox.Show("The calculator was running")
End If
Next
End Sub