Vb.net webbrowser help?

Please support our VB.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Jan 2009
Posts: 10
Reputation: tableray is an unknown quantity at this point 
Solved Threads: 0
tableray tableray is offline Offline
Newbie Poster

Vb.net webbrowser help?

 
0
  #1
May 2nd, 2009
i want to show a msgbox when i click on the webbrowser control on my form.. how do i do it? why isnt there a mouseclick event in the webbrowser method listbox?
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 710
Reputation: Teme64 will become famous soon enough Teme64 will become famous soon enough 
Solved Threads: 114
Teme64's Avatar
Teme64 Teme64 is offline Offline
Master Poster

Re: Vb.net webbrowser help?

 
0
  #2
May 2nd, 2009
why isnt there a mouseclick event in the webbrowser method listbox?
Because the mouse click is sent to the web page shown in the control. Just like you normally click the web pages in your browser. The explanation above is not totally correct, but I think it's good enough

I don't know why would you like to trap the mouse click, but you could try to use GotFocus event
  1. Private Sub WebBrowser1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles WebBrowser1.GotFocus
  2. '
  3. MessageBox.Show("Click", "Click", MessageBoxButtons.OK, MessageBoxIcon.Information)
  4.  
  5. End Sub
It does have its limitations compared to "normal" Click event.
Reply With Quote Quick reply to this message  
Join Date: Jan 2009
Posts: 10
Reputation: tableray is an unknown quantity at this point 
Solved Threads: 0
tableray tableray is offline Offline
Newbie Poster

Re: Vb.net webbrowser help?

 
0
  #3
May 2nd, 2009
yup i tried using that initially but it doesnt work.. the msgbox showed even before the form appeared.. and the msgbox keeps popping up..
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 710
Reputation: Teme64 will become famous soon enough Teme64 will become famous soon enough 
Solved Threads: 114
Teme64's Avatar
Teme64 Teme64 is offline Offline
Master Poster

Re: Vb.net webbrowser help?

 
0
  #4
May 3rd, 2009
There's GeckoFX which I haven't used myself. But I guess it will handle mouse clicks like WebBrowser does.

You may have to do it a bit harder way with Windows API Reference or by using a global mouse hook.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for VB.NET
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC