Live Chat Icon For mobile
Live Chat Icon

How can I display HTML in a Form

Platform: WinForms| Category: Tips

You can add a web browser to a form in a straight forward manner.
1) Right-click your toolbox and select Customize Toolbox. Then add the Com Component ’Microsoft Web Browser’.
2) Drag the just added Explorer tool and drop it on your form to position it where you want it.
3) Set the initial display page using code such as:

	public Form1()
	// Required for Windows Form Designer support

		object a = 0;
		object b = 0;
		object c = 0;
		object d = 0;
		axWebBrowser1.Navigate('', ref a, ref b, ref c, ref d);
	// TODO: Add any constructor code after InitializeComponent call

Share with

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.