Psst! Did you know DevelopmentNow is a mobile web site design agency?

Contact us for help mobilizing your site, or to sign up for our beta Mobile Web SDK!
all groups > c# > july 2003 >

c# : Preview control



#Hai
7/2/2003 8:36:43 AM
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 ?


Maxim S. Lee
7/3/2003 9:51:24 AM
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.


[quoted text, click to view]
Adam Byrne
7/3/2003 4:39:38 PM
Have a look at
http://www.vbaccelerator.com/home/NET/Code/Libraries/Shell_Projects/Thumbnai
l_Extraction/article.asp
if it's thumbnails you're after.

-adam

[quoted text, click to view]
axWebBrowser1.ExecWB(SHDocVw.OLECMDID.OLECMDID_PRINTPREVIEW,SHDocVw.OLECMDEX
ECOPT.OLECMDEXECOPT_DODEFAULT,ref
[quoted text, click to view]

AddThis Social Bookmark Button