[教程]VB编程学习**制作外挂课程
2011/9/19 9:42:00 人气 426 怀旧国机论坛需要VB API函数:FindWindow ←寻找窗口列表中第一个符合指定条件的顶级窗口GetWindowThreadProcessId ←获取与指定窗口关联在一起的一个进程和线程标识符--------------------------------------------------------------------------------------------------------------------------------------------------------↓↓↓
[知音于2011-9-19 9:44:18续贴]:
相关API声明:FindWindow↓Private * Function FindWindow Lib “user32“ Alias “FindWindowA“ (ByVal lpClassName As String, ByVal lpWindowName As String) As LongGetWindowThreadProcessId↓Private * Function GetWindowThreadProcessId Lib “user32“ (ByVal hwnd As Long,
[知音于2011-9-19 9:45:35续贴]:
源代码:Private * Function FindWindow Lib “user32“ Alias “FindWindowA“ (ByVal lpClassName As String, ByVal lpWindowName As String) As LongPrivate * Function GetWindowThreadProcessId Lib “user32“ (ByVal hwnd As Long, lpdwProcessId As Long)As LongPrivate Sub
[知音于2011-9-19 9:46:51续贴]:
Timer1_Timer()Dim hwnd As Long‘ 储存 FindWindow 函数返回的句柄hwnd = FindWindow(vbNullString, “Windows Media Player“)‘ 取得进程标识符‘只要把Windows Media Player换成游戏的名称就可了!If hwnd = 0 ThenLabel1.Caption = “游戏未运行“ElseLabel1.Caption = “游戏已运行“End IfEnd Sub
[知音于2011-9-19 9:44:18续贴]:
相关API声明:FindWindow↓Private * Function FindWindow Lib “user32“ Alias “FindWindowA“ (ByVal lpClassName As String, ByVal lpWindowName As String) As LongGetWindowThreadProcessId↓Private * Function GetWindowThreadProcessId Lib “user32“ (ByVal hwnd As Long,
[知音于2011-9-19 9:45:35续贴]:
源代码:Private * Function FindWindow Lib “user32“ Alias “FindWindowA“ (ByVal lpClassName As String, ByVal lpWindowName As String) As LongPrivate * Function GetWindowThreadProcessId Lib “user32“ (ByVal hwnd As Long, lpdwProcessId As Long)As LongPrivate Sub
[知音于2011-9-19 9:46:51续贴]:
Timer1_Timer()Dim hwnd As Long‘ 储存 FindWindow 函数返回的句柄hwnd = FindWindow(vbNullString, “Windows Media Player“)‘ 取得进程标识符‘只要把Windows Media Player换成游戏的名称就可了!If hwnd = 0 ThenLabel1.Caption = “游戏未运行“ElseLabel1.Caption = “游戏已运行“End IfEnd Sub
椅子 | >繁.花<_玩世’不恭“09-19 11:41 力顶同城、力挺河北. |
发表回复