Click here to Skip to main content
15,846,727 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
private void Font_Click(object sender, EventArgs e)
       {
           DialogResult r = fontDialog1.ShowDialog();
           if (r == DialogResult.OK)
           {
               Font font = fontDialog1.Font;
               //this.webBrowser1.DocumentText = string.Format("Font is: {0}", font.Name);
               this.webBrowser1.DocumentText = font;
           }
       }




i entered some text in web browser control...
i need to change the selected text color,font style, font size using font dialog box control
Posted

1 solution

If you want to modify the HTML elements and text in the document, look at this:

IHTMLDocument2 interface

To use it you need a reference to "C:\Program Files\Microsoft.NET\Primary Interop Assemblies\Microsoft.mshtml.dll"
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900