473,394 Members | 1,774 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,394 software developers and data experts.

Windows Forms Control to Display HTML

Is there a control for Windows Forms that will display HTML (from either a
variable or a stored file) as it would appear in a browser window?

I'm trying to create a Windows Form that includes a Tab control with two
tabs. One tab includes a text box, and the other should include the control
I'm looking for. When the form is opened, I want to pass a string variable
containing HTML source text and fill both controls, so I can switch back and
forth quickly between source and HTML view, similar to the way FrontPage or
VS handles these pages.

Note that I do not need to edit the HTML text, nor do I need to keep the two
controls synchronized.
Nov 22 '05 #1
3 7590
There is no built-in managed control, but you can safely use the COM Web
Browser control ShDocVW.dll to render HTML.
Adam Kenney wrote:
Is there a control for Windows Forms that will display HTML (from either a
variable or a stored file) as it would appear in a browser window?

I'm trying to create a Windows Form that includes a Tab control with two
tabs. One tab includes a text box, and the other should include the control
I'm looking for. When the form is opened, I want to pass a string variable
containing HTML source text and fill both controls, so I can switch back and
forth quickly between source and HTML view, similar to the way FrontPage or
VS handles these pages.

Note that I do not need to edit the HTML text, nor do I need to keep the two
controls synchronized.

Nov 22 '05 #2
Thank you!

"Joshua Flanagan" wrote:
There is no built-in managed control, but you can safely use the COM Web
Browser control ShDocVW.dll to render HTML.
Adam Kenney wrote:
Is there a control for Windows Forms that will display HTML (from either a
variable or a stored file) as it would appear in a browser window?

I'm trying to create a Windows Form that includes a Tab control with two
tabs. One tab includes a text box, and the other should include the control
I'm looking for. When the form is opened, I want to pass a string variable
containing HTML source text and fill both controls, so I can switch back and
forth quickly between source and HTML view, similar to the way FrontPage or
VS handles these pages.

Note that I do not need to edit the HTML text, nor do I need to keep the two
controls synchronized.

Nov 22 '05 #3
CMM
I wouldn't say "safely." ;-) There are some quirks to look out for. For
instance, loading the Webbrowser control and then dismissing the form without
*showing* the control at least once results in a "handle not created" error.
This makes putting the Webbrowser in a TabControl somewhat error-prone.

There's also some other weird behaviors... like with the way it tends to
steal some messages from the parent form when it has the focus.

Still, it works rather well- all things considered.
"Joshua Flanagan" wrote:
There is no built-in managed control, but you can safely use the COM Web
Browser control ShDocVW.dll to render HTML.
Adam Kenney wrote:
Is there a control for Windows Forms that will display HTML (from either a
variable or a stored file) as it would appear in a browser window?

I'm trying to create a Windows Form that includes a Tab control with two
tabs. One tab includes a text box, and the other should include the control
I'm looking for. When the form is opened, I want to pass a string variable
containing HTML source text and fill both controls, so I can switch back and
forth quickly between source and HTML view, similar to the way FrontPage or
VS handles these pages.

Note that I do not need to edit the HTML text, nor do I need to keep the two
controls synchronized.

Nov 22 '05 #4

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

Similar topics

3
by: Jay | last post by:
Hi all, May i know if there is any way by which we can render a given HTML inside .NET Windows Forms? We had the Web Browser controls in Visual Studio 6. Is there a follow-up of that in...
3
by: Adam Kenney | last post by:
Is there a control for Windows Forms that will display HTML (from either a variable or a stored file) as it would appear in a browser window? I'm trying to create a Windows Form that includes a...
2
by: Phil Stanton | last post by:
When designing a new form or report, the Default ForeColor is often something like -2147483640 which is the colour of Windows text (possibly black) and the default backColor is -2147483643...
4
by: Jeff Griffin | last post by:
OK, this should be my last question for the day. I have spent a couple hours on google trying to figure this out but I probibly just dont know what I really need to be searching for. I have a...
0
by: Sinisa | last post by:
I have a Windows form which has multiple groups of the same window controls. I wanted to create a control class that has the standard controls in one. something like: public class Sensor :...
1
by: Chung | last post by:
Hi I am trying to create a Web applicatiion by using windows user control. I am having problem when I trying to load the web page, I got blank screen with a broken image. It is like the web...
5
by: Sudharsan | last post by:
Hi I have developed a Windows Control Library in VC.NET The component will play back video files and this component is used in C# applications to display multiple videos simultaneously. The...
4
by: Dennis | last post by:
Is there any way I can display an html string in a windows form or windows form control like a rich text box. Note, I'm using windows forms, not the web. Thanks for any help. -- Dennis in...
0
by: Jake Montgomery | last post by:
I am using .NET 2.0 forms and running on Windows XP SP2. When I have a tooltip on a combo box, and the combo box is expanded (“dropped down”) using the arrow, it will no longer display it’s...
3
by: C#Schroeder | last post by:
I am new to creating a windows application and have been asked to display an HTML page when a certain button is clicked. I have created the HTML page but don't know how to display it when the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.