Private Declare Function FindWindow Lib "user32.dll" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function FindWindowEx Lib "user32.dll" Alias "FindWindowExA" (ByVal hWndParent As Long, ByVal hWndChildAfter As Long, ByVal lpszClass As String, ByVal lpszWindow As String) As Long
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Sub Command1_Click()
Dim hw As Long
Dim hw2 As Long
hw = FindWindow(vbNullString, "FlashFXP")
If hw <> 0 Then
Text1.Text = hw
Else
MsgBox "FlashFXP没有找到"
End If
End Sub
获取的结果与spy++获取的16进制结果转为10进制后一致。
QQ图片20181205140510.png XEMC$H{{RUI~IDS`B_S}$T4.png
网友评论