|
Prev: Datagridview not populating from stored proc with 2 parameters
Next: Crystal Report To Excel Problem
From: kimiraikkonen on 7 Jul 2008 15:29 Hi there, I needed to use MouseOver event on Webbrowser which is NOT provided by webbrowser control natively(what a disappointment), so i decided to go with another route to simulate this like: //////////////////////////////////////////////// Public Sub DisplayHyperlinks(ByVal sender As Object, ByVal e As System.Windows.Forms.HtmlElementEventArgs) ' My codes here End Sub Private Sub webbrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles webbrowser1.DocumentCompleted ' Here is my question ' Although intellisense doesn't recognize "Document", but i'm still able to compile ' and use this addhandler syntax without any build or runtime errors AddHandler webbrowser1.Document.MouseOver, AddressOf Me.DisplayHyperlinks End Sub \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ Shortly: "AddHandler webbrowser1.Document.MouseOver, AddressOf Me.DisplayHyperlinks" ...that syntax claims no error when it's built / compiled, but IntelliSense doesn't recognize "Document" after "webbrowser1" object. Why? I hope i have explained enoug clear, Thanks, Onur Güzel
From: Lloyd Sheen on 7 Jul 2008 16:21 "kimiraikkonen" <kimiraikkonen85(a)gmail.com> wrote in message news:2fe0281b-107b-434f-b6df-61a01310effc(a)m44g2000hsc.googlegroups.com... Hi there, I needed to use MouseOver event on Webbrowser which is NOT provided by webbrowser control natively(what a disappointment), so i decided to go with another route to simulate this like: //////////////////////////////////////////////// Public Sub DisplayHyperlinks(ByVal sender As Object, ByVal e As System.Windows.Forms.HtmlElementEventArgs) ' My codes here End Sub Private Sub webbrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles webbrowser1.DocumentCompleted ' Here is my question ' Although intellisense doesn't recognize "Document", but i'm still able to compile ' and use this addhandler syntax without any build or runtime errors AddHandler webbrowser1.Document.MouseOver, AddressOf Me.DisplayHyperlinks End Sub \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ Shortly: "AddHandler webbrowser1.Document.MouseOver, AddressOf Me.DisplayHyperlinks" ....that syntax claims no error when it's built / compiled, but IntelliSense doesn't recognize "Document" after "webbrowser1" object. Why? I hope i have explained enoug clear, Thanks, Onur G�zel What are you trying to get. If you are trying to get a link when the mouse is over one on a page you can use the StatusTextChanged event to get links. LS
From: Steve Gerrard on 7 Jul 2008 21:51 kimiraikkonen wrote: > Shortly: > "AddHandler webbrowser1.Document.MouseOver, AddressOf > Me.DisplayHyperlinks" > > ...that syntax claims no error when it's built / compiled, but > IntelliSense doesn't recognize "Document" after "webbrowser1" object. > > Why? > It does on my machine. Me.WebBrowser1.Document comes right up. Something else not compiling correctly?
From: kimiraikkonen on 8 Jul 2008 05:31 > > What are you trying to get. If you are trying to get a link when the mouse > is over one on a page you can use the StatusTextChanged event to get links. > > LS Yes, but that doesn't provide when mouse is over an image which is my goal about retrieving image location. However, i did it using "AddHandler webbrowser1.Document.MouseOver, AddressOf Me.DisplayHyperlinks" but my question and wonder was just about why Intellisense doesn't offer "Document" after webbrowser1 while you're typing syntax manually instead of pasting from somewhere,you can test it. Though IntelliSense doesn't offer and recognize "Document" after "webbrowser1" object, if i type it without addhandler keyword just to use its members somewhere else it sees "Document" member of "webbrowser1" object with no problem, but as i said if paste the code without manually typing, there are no errors reported even on building my application. That's weird of IntelliSense. Thanks, Onur
From: Steve Gerrard on 8 Jul 2008 10:20 kimiraikkonen wrote: > somewhere,you can test it. Though IntelliSense doesn't offer and > recognize "Document" after "webbrowser1" object, if i type it without > addhandler keyword just to use its members somewhere else it sees > "Document" member of "webbrowser1" object with no problem, Ah, you mean it doesn't show Document after AddHandler. No, it wouldn't. It will filter the list of WebBrowser members to show events that can have a handler added. You can get intellisense for the list of Document events by declaring a temp variable first: Dim x As HtmlDocument = WebBrowser1.Document AddHandler x.MouseOver, AddressOf Me.DisplayHyperlinks
|
Next
|
Last
Pages: 1 2 3 Prev: Datagridview not populating from stored proc with 2 parameters Next: Crystal Report To Excel Problem |