vb.net 怎样获取句柄,发送单击信息?
PrivateConstBM_CLICK=&HF5PrivateConstWM_LBUTTONDOWN=&H201PrivateConstWM_LBUTTONUP=&H2...
Private Const BM_CLICK = &HF5
Private Const WM_LBUTTONDOWN = &H201
Private Const WM_LBUTTONUP = &H202
Dim hWnd1 As IntPtr = FindWindow(Nothing, "窗体标签")
Dim hButton2 As IntPtr = FindWindowEx(hWnd1, IntPtr.Zero, Nothing, "测试按钮")
SendMessage(hButton2, WM_LBUTTONDOWN, 0, 0)
SendMessage(hButton2, WM_LBUTTONUP, 0, 0)
发送按钮后,没反应 展开
Private Const WM_LBUTTONDOWN = &H201
Private Const WM_LBUTTONUP = &H202
Dim hWnd1 As IntPtr = FindWindow(Nothing, "窗体标签")
Dim hButton2 As IntPtr = FindWindowEx(hWnd1, IntPtr.Zero, Nothing, "测试按钮")
SendMessage(hButton2, WM_LBUTTONDOWN, 0, 0)
SendMessage(hButton2, WM_LBUTTONUP, 0, 0)
发送按钮后,没反应 展开
展开全部
现在的程序员编程水平越来越深了,在以前 或现在的某些不要紧的程序 用这SendMessage API函数 在以前很好用,说过期也不会,只是现在的编程人员都有几十种防虚拟按键的办法了,除非你的编程水平比他好才能编出后台键盘或鼠标 的模拟,我用网上的代码也就是这函数SendMessage只会对一小小部分程序有用(在以前对大部分程序游戏都有用), 对现在的好多游戏都不管用了,我知道自己水平菜,帮不了你什么,给个提议花点钱去买个代码吧 ,真买到代码给哥一份吧 哈哈哈
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询