VBNET WindowsAPI:
Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Integer
應用:
Dim hwd1 As IntPtr
hwd1 = FindWindow(vbNullString, "程式名稱")
If hwd1.Equals(IntPtr.Zero) Then
Label1.Text = "該程式沒執行"
Else
Label1.Text = "該程式執行"
End If
沒有留言:
張貼留言