01-01-19, 11:34 PM
هذا الكود شغال معي تمام
كود :
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Dim x_appname As String
x_appname = "VB6"
IsApplicationRunning(x_appname)
End Sub
Private Sub IsApplicationRunning(ByVal ApplicationName As String)
Try
Dim Currentprocess() As Process = Process.GetProcessesByName(ApplicationName)
If Not Currentprocess Is Nothing Then
For Each RunningProcess As Process In Currentprocess
If RunningProcess.ProcessName = ApplicationName Then
MessageBox.Show(ApplicationName & " is already running")
End If
Next
End If
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub

