This code won't work for me:
Actually, neither MsgBox's appear, although notepad is open.
Yes, the timer Is enabled with an interval of 1000ms
Code:
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
IsProcessRunning("notepad")
End Sub
Public Function IsProcessRunning(ByVal name As String) As Boolean
For Each clsProcess As Process In Process.GetProcesses()
If clsProcess.ProcessName.StartsWith(name) Then
Return True
MsgBox("OK!")
End If
Next
Return False
MsgBox("SS")
End Function
Yes, the timer Is enabled with an interval of 1000ms