Preview control

H

#Hai

Hi,
"Preview" is a worthy feature of Windows Explorer.
I want to have a control which previews .HTML files in my form.
How to do this ?
 
M

Maxim S. Lee

Hi!

You can use COM object Microsoft Web Browser (customize your toolbox)
After that put the web browser control to form.

In your code it looks like:
private AxSHDocVw.AxWebBrowser axWebBrowser1;

You can get HTML content and show it so:
object flags=null;
object postData=null;
object header=null;
object targetFrame=null;
axWebBrowser1.Navigate("www.namip.ru", ref flags, ref targetFrame, ref
postData, ref header);

When the fetching will be finished you can do so:
object pv = null;
object pva = null;
axWebBrowser1.ExecWB(SHDocVw.OLECMDID.OLECMDID_PRINTPREVIEW,SHDocVw.OLECMDEXECOPT.OLECMDEXECOPT_DODEFAULT,ref
pv, ref pva);

Its work.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top