| | |
Display a html file on a form
Please support our C# advertiser: Intel Parallel Studio Home
![]() |
Hi,
yeah, you can use the "webBrowser" component. If you don't have this component in your toolbox, just click on the empty place on your toolbox with right mouse button, then "Choose items" and choose the "webBrowser" component. That's how it is in Visual Studio 2005, but I think it'll be quite similar in VS .net, too.
Example:
webBrowser1.Navigate("www.microsoft.com");
yeah, you can use the "webBrowser" component. If you don't have this component in your toolbox, just click on the empty place on your toolbox with right mouse button, then "Choose items" and choose the "webBrowser" component. That's how it is in Visual Studio 2005, but I think it'll be quite similar in VS .net, too.
Example:
webBrowser1.Navigate("www.microsoft.com");
•
•
Join Date: Dec 2004
Posts: 1,655
Reputation:
Solved Threads: 35
Just a note, the webbrowser control is in fact an ecapsulation of the Internet Explorer browser. This allows you to do some unique things. For example, the html you display could contain hyperlinks, and you can overload the Navigate event. So when a user clicks a hyperlink, instead of navigating, you can do whatever you like.
One application I wrote was to display PDF phone statements, with live hyperlinks (I used PostScript and pdfMark programming to create the PDFs w/ hyperlinks).
The PDF was displayed in a web browser control on a windows form. When the call center operator clicked on a given line in the statement, the code captured that event and link to run a query, popping up the call details in a new window.
This let the phone company use the PDF of the exact statement the customer recieved, as an interface back to call data.
One application I wrote was to display PDF phone statements, with live hyperlinks (I used PostScript and pdfMark programming to create the PDFs w/ hyperlinks).
The PDF was displayed in a web browser control on a windows form. When the call center operator clicked on a given line in the statement, the code captured that event and link to run a query, popping up the call details in a new window.
This let the phone company use the PDF of the exact statement the customer recieved, as an interface back to call data.
![]() |
Similar Threads
- html/php form for .htaccess validation (PHP)
- How to display a HTML file (in browser window) from Java Program...? (Java)
Other Threads in the C# Forum
- Previous Thread: Windows form programming tutorials?
- Next Thread: Displaying an Excel document in a windows application
| Thread Tools | Search this Thread |
Tag cloud for C#
.net access ado.net algorithm array barchart bitmap box broadcast buttons c# chat check checkbox class client combobox control conversion csharp custom database datagrid datagridview dataset datetime degrees development draganddrop drawing encryption enum event excel file files form format forms ftp function gdi+ httpwebrequest image index input install label list listbox listener login mandelbrot math mouseclick mysql networking object operator oracle path photoshop picturebox pixelinversion post prime programming radians regex remote remoting resource richtextbox save saving serialization server sleep socket sql statistics stream string table tcp text textbox time timer treeview update usercontrol validation view visualstudio webbrowser windows winforms wpf xml






