sendmessage函数(vb编程)
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
Const WM_LBUTTONDOWN = &H201
Const WM_LBUTTONUP = &H202
——————————————————————————————
SendMessage WebBrowser1.hwnd, WM_LBUTTONDOWN, 0, 0 '试着给WebBrowser1发送鼠标按键
当程序运行上面的语句时在SendMessage WebBrowser1.hwnd, WM_LBUTTONDOWN, 0, 0处出现"对象hwnd的方法IWebBrowser2失败"的错误
参考答案:WebBrowser1 得不到 hwnd 成员