How should I get the message when left button is up/down over the
webbrowser control? (let's say Label1.Caption="Up")
Something is missing or wrong?
THX
'------------------------------------------------------------
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 Const BM_SETSTATE = &HF3
Private Const WM_LBUTTONDOWN = &H201
Private Const WM_LBUTTONUP = &H202
Private Sub Form_Load()
WebBrowser1.Navigate "C:\Test.htm"
End Sub
Private Sub Timer1_Timer()
Static currButton As Integer
Static currHwnd As Long
'restore the last button state to normal
Call SendMessage(currHwnd, BM_SETSTATE, 0, ByVal 0&)
currHwnd = WebBrowser1.hwnd
Call SendMessage(currHwnd, WM_LBUTTONDOWN, 0, ByVal 0&)
Call SendMessage(currHwnd, WM_LBUTTONUP, 0, ByVal 0&)
Call SendMessage(currHwnd, BM_SETSTATE, 1, ByVal 0&)
DoEvents
End Sub
'------------------------------------------------------------