How to do this?
A:
public IHTMLDocument2 Document
{
get
{
return webBrowser.Document as IHTMLDocument2;
}
}
...
Document.execCommand("FontSize", false, doubleValue.ToString())
This shold help
ArsenMkrt
2009-07-13 12:02:50
A:
Right way for WPF:
using mshtml; //reference to COM object "Microsoft HTML Object Library"
...
var doc = web.Document as HTMLDocument;
if (doc != null)
{
doc.execCommand("SelectAll", false, null);
doc.execCommand("FontSize", false, 5);
doc.execCommand("Unselect", false, null);
}
additional information - http://msdn.microsoft.com/en-us/library/ms533049(VS.85).aspx
dmach
2009-07-13 14:18:07
This won't work in Vista. Microsoft has removed support for MSHTML in Vista and above.
eriawan
2009-07-14 05:16:50
I tested it in Vista and it work properly.
dmach
2009-07-15 10:50:11