471,090 Members | 1,342 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,090 software developers and data experts.

Event Mouse Up/Down over Webbrowser control

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?


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&)


End Sub

Jul 17 '05 #1
0 4094

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

12 posts views Thread by Trevor Fairchild | last post: by
2 posts views Thread by Ivan D | last post: by
reply views Thread by Plumer | last post: by
5 posts views Thread by jaysonnward | last post: by
6 posts views Thread by AB | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.