Go Back   Forum Care Forums > Development Reference Area > Visual Basic

Reply
 
LinkBack Thread Tools Display Modes
Event Mouse Up/Down over Webbrowser control
Old
  (#1)
Florin
Guest
 
Posts: n/a
Default Event Mouse Up/Down over Webbrowser control - 06-04-2007, 09:48 AM

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

'------------------------------------------------------------
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Contact Us - Forum Care Forums - Archive - Top