473,397 Members | 1,949 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Displaying HTML - I need a tutorial

I have a desktop application that needs to display some summary information.
At present I use the RichTextBox control but am unhappy with the results.
What I would prefer to do is display an HTML page (complete with graphics)
from within my app.

The problem is that I have no idea how to go about this and seem to be
struggling to find an example that creates the web pages on the fly. Can
anyone point me at a tutorial that deals with displaying HTML from a C#
desktop app.

Many thanks
Steve
Nov 15 '05 #1
2 1356
Steve,

This shouldn't be too hard. You can set a reference to the WebBrowser
control (right click on the toolbox and select the COM tab, it should be
there). This is what will display your HTML. Once you have that, you can
set a reference in your project to the MSHTML libraries (under the COM tab
when you add a reference). Once you have this, you can use the HTMLDocument
class to construct your page (if you wish to go that far). Then, just save
it to a temp directory and point the webbrowser control to that directory.

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Steve Barnett" <no****@nodomain.com> wrote in message
news:%2******************@TK2MSFTNGP09.phx.gbl...
I have a desktop application that needs to display some summary information. At present I use the RichTextBox control but am unhappy with the results.
What I would prefer to do is display an HTML page (complete with graphics)
from within my app.

The problem is that I have no idea how to go about this and seem to be
struggling to find an example that creates the web pages on the fly. Can
anyone point me at a tutorial that deals with displaying HTML from a C#
desktop app.

Many thanks
Steve

Nov 15 '05 #2

And I thought COM was dead.

Thanks
Steve

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:OE**************@TK2MSFTNGP10.phx.gbl...
| Steve,
|
| This shouldn't be too hard. You can set a reference to the WebBrowser
| control (right click on the toolbox and select the COM tab, it should be
| there). This is what will display your HTML. Once you have that, you can
| set a reference in your project to the MSHTML libraries (under the COM tab
| when you add a reference). Once you have this, you can use the
HTMLDocument
| class to construct your page (if you wish to go that far). Then, just
save
| it to a temp directory and point the webbrowser control to that directory.
|
| Hope this helps.
|
| --
| - Nicholas Paldino [.NET/C# MVP]
| - mv*@spam.guard.caspershouse.com
|
| "Steve Barnett" <no****@nodomain.com> wrote in message
| news:%2******************@TK2MSFTNGP09.phx.gbl...
| > I have a desktop application that needs to display some summary
| information.
| > At present I use the RichTextBox control but am unhappy with the
results.
| > What I would prefer to do is display an HTML page (complete with
graphics)
| > from within my app.
| >
| > The problem is that I have no idea how to go about this and seem to be
| > struggling to find an example that creates the web pages on the fly. Can
| > anyone point me at a tutorial that deals with displaying HTML from a C#
| > desktop app.
| >
| > Many thanks
| > Steve
| >
| >
|
|
Nov 15 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Glen | last post by:
I have a list of beans that I retrieved from a database. These beans are all of the same class. Now I want to display these beans in a struts form so that the user can modify the data in the...
3
by: suhaddad | last post by:
I have an XML schema that I want to modify. I need to change the text from English to Arabic, but I can't seem to be able to do so. <LearningResourceData Type="Session - Tutorial and Workouts">...
3
by: Armand Karlsen | last post by:
What code can I put in a web page to make a browser show a piece of (x)html, instead of trying to render it?
10
by: Safalra | last post by:
When a poster in a forum I frequent said they were beginning to learn HTML, I thought I should direct them to a good HTML tutorial so that they wouldn't start using <blink> and the like....
2
by: p.mc | last post by:
Hi all, I'm using asp.net to display data from a SQL Server database, I've managed to display the data using dataGrids but now need to have more control over the display of the data. I'd like...
15
by: Kevin Hanken | last post by:
Hi, Pretty much a newbie to aspnet and xp -- I am using XP Pro, Service Pack 2. I installed IIS, set up a virtual directory, created an aspx file and pasted in a little code from the w3schools...
7
by: Turbo | last post by:
I have a written a detailed html tutorial here:- http://sandy007smarty.seo.iitm.ac.in/2006/09/26/html-tutorial/ I know there are a couple of html tutorials out there. But its a tutorial without...
5
by: L C | last post by:
Hello, Could someone point in the correct direction with regards to displaying my data in "nicer" format. I have figured out ( with the tutorials on the web, and the O'Reilly PHP & MySQL book)...
10
by: happyse27 | last post by:
Hi All, I got this apache errors(see section A1 and A2 below) when I used a html(see section b below) to activate acctman.pl(see section c below). Section D below is part of the configuration...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.