943,714 Members | Top Members by Rank

Ad:
  • VB.NET Discussion Thread
  • Unsolved
  • Views: 1959
  • VB.NET RSS
May 2nd, 2009
0

Vb.net webbrowser help?

Expand Post »
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?
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
tableray is offline Offline
10 posts
since Jan 2009
May 2nd, 2009
0

Re: Vb.net webbrowser help?

Quote ...
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
VB.NET Syntax (Toggle Plain Text)
  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.
Reputation Points: 218
Solved Threads: 201
Veteran Poster
Teme64 is offline Offline
1,024 posts
since Aug 2008
May 2nd, 2009
0

Re: Vb.net webbrowser help?

yup i tried using that initially but it doesnt work.. the msgbox showed even before the form appeared.. and the msgbox keeps popping up..
Reputation Points: 10
Solved Threads: 0
Newbie Poster
tableray is offline Offline
10 posts
since Jan 2009
May 3rd, 2009
0

Re: Vb.net webbrowser help?

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.
Reputation Points: 218
Solved Threads: 201
Veteran Poster
Teme64 is offline Offline
1,024 posts
since Aug 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in VB.NET Forum Timeline: Need to get program to recognize variables/arrays outside the subroutine
Next Thread in VB.NET Forum Timeline: need some res thread from u all





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC