不行啊
Const WM_LBUTTONDOWN = &H201
Const WM_LBUTTONUP = &H202
WindowHandle = FindWindow(vbNullString, "1")'查找窗口
MsgBox "WindowHandle1=" & WindowHandle '判断窗口句柄是否能找到
WindowHandle1 = FindWindowEx(WindowHandle, 0, "ThunderRT6CommandButton", vbNullString)'查找按钮MsgBox "WindowHandle1=" & WindowHandle1 '判断控件句柄是否能找到
SendMessage WindowHandle1, WM_LBUTTONDOWN, 0, 0
Sleep (1000)
SendMessage WindowHandle1, WM_LBUTTONUP, 0, 0
窗口 1 里只有一个按钮控件,按下控件会弹出msgbox
SendMessage Sleep FindWindow 这些我都声明了,执行后控件好像被选中了,但是没有按下去,这是怎么回事
[[italic] 本帖最后由 烟雨袅袅 于 2007-12-18 16:14 编辑 [/italic]]