Advertisement
Asfelius

check for process vb

Jul 16th, 2022
433
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 0.30 KB | None | 0 0
  1. Imports System.Diagnostics
  2.  
  3. Private Function checkproc(ByVal sName As String) As Boolean
  4.     If Process.GetProcessesByName(sName).Count > 0 Then
  5.         Return True
  6.     Else
  7.         Return False
  8.     End If
  9. End Function
  10.  
  11.  
  12.     If checkproc("firefox") Then
  13.         MsgBox("Is running!")
  14.     Else
  15.     MsgBox("Is not running!")
  16.     End If
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement