Preview control

  • Thread starter Thread starter #Hai
  • Start date Start date
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 ?
 
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.
 
Back
Top