举个例子,获得exe的是通过下面程序。
Public Declare Function FindWindow Lib "user32" _
Alias "FindWindowA" (ByVal lpClassName As String, _
ByVal lpWindowName As String) As Long
Dim hwnd As Integer
Dim strAppName As String
strAppName = "app name"
hwnd = FindWindow(vbNullString, strAppName)
If hwnd Then
Call PostMessage(hwnd, 273, 2, 0)
End If