Showing up webpages/HTML in C# Program

  • Thread starter Thread starter JesseJames
  • Start date Start date
J

JesseJames

I want to show HTML documents/sites inside my C# program.
I also want the links in the HTML page to tirgger events in the
program that shows the HTML, like every link in the page will dispaly
extra info on the link in the program outside the HTML.

Have any ideas how to show the HTML and tirggering stuff in the
program?
 
JesseJames said:
I want to show HTML documents/sites inside my C# program.
I also want the links in the HTML page to tirgger events in the
program that shows the HTML, like every link in the page will dispaly
extra info on the link in the program outside the HTML.

Have any ideas how to show the HTML and tirggering stuff in the
program?

You can embed IE as an ActiveX control in your WinForms application. See
http://www.syncfusion.com/FAQ/WinForms/FAQ_c100c.asp#q645q

Cheers,
 
Hi!
you have to use axwebbrowser(put it on your form).
for the refernces of that control see:
http://weblogs.asp.net/stevencohn/archive/2004/06/09/151836.aspx

any way for use it you have to navigate your url like that:
public int Navigate(String URL)
{
int iRet=0;
object vPost;
object vHeaders;
object oEmpty = "";
object oURL = URL;
vHeaders = "Content-Type: application/x-www-form-urlencoded" + "\n" + "\r";
vPost = ASCIIEncoding.ASCII.GetBytes("");
web.Navigate2(ref oURL, ref oEmpty, ref oEmpty, ref vPost, ref
vHeaders);
//OR You can use the Navigate method as follows
//axWebBrowser.Navigate("http://<server>/navpost.aspx", ref oEmpty, ref
oEmpty, ref vPost, ref vHeaders);
m_bDocumentComplete = false;
return iRet;
}
 
Thanks for the help.
Let's say I use the IE ActiveX control inside my form.
I want to add an extra feature - When I click on a link in the webpage,
I want extra info popping out in the form and not in the IE control -
can I do this?
How do I do this?
 
Hi!
you can do it, you have to find the link element and define the event for
that and then do what ever you want.
you have to find an event fot that in the browser,
i don't do it in my application,i'm doinn browsing automation.

guy
 
Back
Top