|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
WebBrowserIs it possible, on a WebBrowser control, to intercept a HyperLink and react
programmatically to this click ? That's my first question. In fact, I use the Webbrowser as a sort of report (I write the html code and tables programmatically in a string, and I give the string to the property DocumentText of the WebBrowser, and I insert in this code some Hyperlinks by wich I could react, launching an specific action) The properties ShowPrintPreviewDialog and others 'Show...' properties of the WebControl are very interresting, and sometimes better then using true Reports or CrystalReports The second question is : is there a document somewhere who discuss on this subject, comparing CrystalReports and use of WebBrowser in their function of showing reports ? I try to explore this way. Thanks for your response Hi Philip
You can handle the BeforeNavigate2() event and do your own thing. HTH Charles Show quoteHide quote "philip" <p***@philippe.com> wrote in message news:440d762b$0$6648$8fcfb975@news.wanadoo.fr... > Is it possible, on a WebBrowser control, to intercept a HyperLink and > react programmatically to this click ? > That's my first question. > > In fact, I use the Webbrowser as a sort of report (I write the html code > and tables programmatically in a string, and I give the string to the > property DocumentText of the WebBrowser, and I insert in this code some > Hyperlinks by wich I could react, launching an specific action) > The properties ShowPrintPreviewDialog and others 'Show...' properties of > the WebControl are very interresting, and sometimes better then using true > Reports or CrystalReports > > The second question is : is there a document somewhere who discuss on this > subject, comparing CrystalReports and use of WebBrowser in their function > of showing reports ? I try to explore this way. > > Thanks for your response > I don't discover this event in WebBrowser.
I have Visual Studio 2005. Is it normal ? Must I have a reference ? Thanks for your help Philip "Charles Law" <bl***@nowhere.com> a écrit dans le message de news: %23TJqLteQGHA.5***@TK2MSFTNGP10.phx.gbl...Show quoteHide quote > Hi Philip > > You can handle the BeforeNavigate2() event and do your own thing. > > HTH > > Charles > > > "philip" <p***@philippe.com> wrote in message > news:440d762b$0$6648$8fcfb975@news.wanadoo.fr... >> Is it possible, on a WebBrowser control, to intercept a HyperLink and >> react programmatically to this click ? >> That's my first question. >> >> In fact, I use the Webbrowser as a sort of report (I write the html code >> and tables programmatically in a string, and I give the string to the >> property DocumentText of the WebBrowser, and I insert in this code some >> Hyperlinks by wich I could react, launching an specific action) >> The properties ShowPrintPreviewDialog and others 'Show...' properties of >> the WebControl are very interresting, and sometimes better then using >> true Reports or CrystalReports >> >> The second question is : is there a document somewhere who discuss on >> this subject, comparing CrystalReports and use of WebBrowser in their >> function of showing reports ? I try to explore this way. >> >> Thanks for your response >> > > Philip,
Using the 2005 WB, this event is called "navigating." Show quoteHide quote "philip" <p***@philippe.com> wrote in message news:440d9d06$0$20154$8fcfb975@news.wanadoo.fr... >I don't discover this event in WebBrowser. > I have Visual Studio 2005. > Is it normal ? > Must I have a reference ? > > Thanks for your help > > Philip > > "Charles Law" <bl***@nowhere.com> a écrit dans le message de news: > %23TJqLteQGHA.5***@TK2MSFTNGP10.phx.gbl... >> Hi Philip >> >> You can handle the BeforeNavigate2() event and do your own thing. >> >> HTH >> >> Charles >> >> >> "philip" <p***@philippe.com> wrote in message >> news:440d762b$0$6648$8fcfb975@news.wanadoo.fr... >>> Is it possible, on a WebBrowser control, to intercept a HyperLink and >>> react programmatically to this click ? >>> That's my first question. >>> >>> In fact, I use the Webbrowser as a sort of report (I write the html code >>> and tables programmatically in a string, and I give the string to the >>> property DocumentText of the WebBrowser, and I insert in this code some >>> Hyperlinks by wich I could react, launching an specific action) >>> The properties ShowPrintPreviewDialog and others 'Show...' properties of >>> the WebControl are very interresting, and sometimes better then using >>> true Reports or CrystalReports >>> >>> The second question is : is there a document somewhere who discuss on >>> this subject, comparing CrystalReports and use of WebBrowser in their >>> function of showing reports ? I try to explore this way. >>> >>> Thanks for your response >>> >> >> > > But now, how can I know which HyperLink has been clicked ?
Thanks for help, Colin. Philip "Colin Neller" <cnel***@gmail.com> a écrit dans le message de news: u6K%23njfQGHA.2***@TK2MSFTNGP11.phx.gbl...Show quoteHide quote > Philip, > > Using the 2005 WB, this event is called "navigating." > > -- > Colin Neller > http://www.colinneller.com/blog > > "philip" <p***@philippe.com> wrote in message > news:440d9d06$0$20154$8fcfb975@news.wanadoo.fr... >>I don't discover this event in WebBrowser. >> I have Visual Studio 2005. >> Is it normal ? >> Must I have a reference ? >> >> Thanks for your help >> >> Philip >> >> "Charles Law" <bl***@nowhere.com> a écrit dans le message de news: >> %23TJqLteQGHA.5***@TK2MSFTNGP10.phx.gbl... >>> Hi Philip >>> >>> You can handle the BeforeNavigate2() event and do your own thing. >>> >>> HTH >>> >>> Charles >>> >>> >>> "philip" <p***@philippe.com> wrote in message >>> news:440d762b$0$6648$8fcfb975@news.wanadoo.fr... >>>> Is it possible, on a WebBrowser control, to intercept a HyperLink and >>>> react programmatically to this click ? >>>> That's my first question. >>>> >>>> In fact, I use the Webbrowser as a sort of report (I write the html >>>> code and tables programmatically in a string, and I give the string to >>>> the property DocumentText of the WebBrowser, and I insert in this code >>>> some Hyperlinks by wich I could react, launching an specific action) >>>> The properties ShowPrintPreviewDialog and others 'Show...' properties >>>> of the WebControl are very interresting, and sometimes better then >>>> using true Reports or CrystalReports >>>> >>>> The second question is : is there a document somewhere who discuss on >>>> this subject, comparing CrystalReports and use of WebBrowser in their >>>> function of showing reports ? I try to explore this way. >>>> >>>> Thanks for your response >>>> >>> >>> >> >> > > Ok, I found.
I use e.Url Thanks for you help Philip "Colin Neller" <cnel***@gmail.com> a écrit dans le message de news: u6K%23njfQGHA.2***@TK2MSFTNGP11.phx.gbl...Show quoteHide quote > Philip, > > Using the 2005 WB, this event is called "navigating." > > -- > Colin Neller > http://www.colinneller.com/blog > > "philip" <p***@philippe.com> wrote in message > news:440d9d06$0$20154$8fcfb975@news.wanadoo.fr... >>I don't discover this event in WebBrowser. >> I have Visual Studio 2005. >> Is it normal ? >> Must I have a reference ? >> >> Thanks for your help >> >> Philip >> >> "Charles Law" <bl***@nowhere.com> a écrit dans le message de news: >> %23TJqLteQGHA.5***@TK2MSFTNGP10.phx.gbl... >>> Hi Philip >>> >>> You can handle the BeforeNavigate2() event and do your own thing. >>> >>> HTH >>> >>> Charles >>> >>> >>> "philip" <p***@philippe.com> wrote in message >>> news:440d762b$0$6648$8fcfb975@news.wanadoo.fr... >>>> Is it possible, on a WebBrowser control, to intercept a HyperLink and >>>> react programmatically to this click ? >>>> That's my first question. >>>> >>>> In fact, I use the Webbrowser as a sort of report (I write the html >>>> code and tables programmatically in a string, and I give the string to >>>> the property DocumentText of the WebBrowser, and I insert in this code >>>> some Hyperlinks by wich I could react, launching an specific action) >>>> The properties ShowPrintPreviewDialog and others 'Show...' properties >>>> of the WebControl are very interresting, and sometimes better then >>>> using true Reports or CrystalReports >>>> >>>> The second question is : is there a document somewhere who discuss on >>>> this subject, comparing CrystalReports and use of WebBrowser in their >>>> function of showing reports ? I try to explore this way. >>>> >>>> Thanks for your response >>>> >>> >>> >> >> > > I don't discover this event in WebBrowser.
I have Visual Studio 2005. Is it normal ? Must I ADD a reference ? Thanks for your help Philip "Charles Law" <bl***@nowhere.com> a écrit dans le message de news: %23TJqLteQGHA.5***@TK2MSFTNGP10.phx.gbl...Show quoteHide quote > Hi Philip > > You can handle the BeforeNavigate2() event and do your own thing. > > HTH > > Charles > > > "philip" <p***@philippe.com> wrote in message > news:440d762b$0$6648$8fcfb975@news.wanadoo.fr... >> Is it possible, on a WebBrowser control, to intercept a HyperLink and >> react programmatically to this click ? >> That's my first question. >> >> In fact, I use the Webbrowser as a sort of report (I write the html code >> and tables programmatically in a string, and I give the string to the >> property DocumentText of the WebBrowser, and I insert in this code some >> Hyperlinks by wich I could react, launching an specific action) >> The properties ShowPrintPreviewDialog and others 'Show...' properties of >> the WebControl are very interresting, and sometimes better then using >> true Reports or CrystalReports >> >> The second question is : is there a document somewhere who discuss on >> this subject, comparing CrystalReports and use of WebBrowser in their >> function of showing reports ? I try to explore this way. >> >> Thanks for your response >> > > Perhaps the event 'Navigating' replace the 'BeforeNavigate2' event ?
I can use e.Cancel to cancel and do my own thing. But now, how can I know which HyperLink has been clicked ? Thanks for help, Charles. Philip "Charles Law" <bl***@nowhere.com> a écrit dans le message de news: %23TJqLteQGHA.5***@TK2MSFTNGP10.phx.gbl...Show quoteHide quote > Hi Philip > > You can handle the BeforeNavigate2() event and do your own thing. > > HTH > > Charles > > > "philip" <p***@philippe.com> wrote in message > news:440d762b$0$6648$8fcfb975@news.wanadoo.fr... >> Is it possible, on a WebBrowser control, to intercept a HyperLink and >> react programmatically to this click ? >> That's my first question. >> >> In fact, I use the Webbrowser as a sort of report (I write the html code >> and tables programmatically in a string, and I give the string to the >> property DocumentText of the WebBrowser, and I insert in this code some >> Hyperlinks by wich I could react, launching an specific action) >> The properties ShowPrintPreviewDialog and others 'Show...' properties of >> the WebControl are very interresting, and sometimes better then using >> true Reports or CrystalReports >> >> The second question is : is there a document somewhere who discuss on >> this subject, comparing CrystalReports and use of WebBrowser in their >> function of showing reports ? I try to explore this way. >> >> Thanks for your response >> > > > Perhaps the event 'Navigating' replace the 'BeforeNavigate2' event ? That is correct. The 2005 WB changes the event name to "Navigating"> I can use e.Cancel to cancel and do my own thing. > But now, how can I know which HyperLink has been clicked ? It would help to know exactly what you're trying to do. If you need to know the specific anchor tag that was clicked, then you'll actually need to sink the events from the HTMLDocument its self and capture the "onclick" event rather than the "Navigating" event. I found e.Url in the event Navigating.
I can know which hyperlink was clicked. Thank you for your help, sincerely. Philip "Colin Neller" <cnel***@gmail.com> a écrit dans le message de news: uadmEtfQGHA.1***@TK2MSFTNGP12.phx.gbl...Show quoteHide quote >> Perhaps the event 'Navigating' replace the 'BeforeNavigate2' event ? >> I can use e.Cancel to cancel and do my own thing. > That is correct. The 2005 WB changes the event name to "Navigating" > >> But now, how can I know which HyperLink has been clicked ? > It would help to know exactly what you're trying to do. If you need to > know the specific anchor tag that was clicked, then you'll actually need > to sink the events from the HTMLDocument its self and capture the > "onclick" event rather than the "Navigating" event. > -- > Colin Neller > http://www.colinneller.com/blog > |
|||||||||||||||||||||||