LordKusa

Preguntar si existe el proceso

May 4th, 2019
119
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Public Declare Auto Function FindWindowNullClassName Lib "User32.dll" Alias "FindWindow" (ByVal lpClassname As Integer, ByVal lpWindownName As String) As Integer
  2.  
  3.     Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
  4.         Dim hWnd As Integer = FindWindowNullClassName(0, "Administrador de tareas")
  5.  
  6.         If hWnd = 0 Then
  7.             MsgBox("no hola")
  8.         Else
  9.             MsgBox("hola")
  10.         End If
  11.     End Sub
RAW Paste Data