By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,673 Members | 1,268 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,673 IT Pros & Developers. It's quick & easy.

Preview control

P: n/a
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 ?

Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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_PRI NTPREVIEW,SHDocVw.OLECMDEXECOPT.OLECMDEXECOPT_DODE FAULT,ref
pv, ref pva);

Its work.
#Hai wrote:
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 ?


Nov 13 '05 #2

P: n/a
Have a look at
http://www.vbaccelerator.com/home/NE...jects/Thumbnai
l_Extraction/article.asp
if it's thumbnails you're after.

-adam

"Maxim S. Lee" <il******@mail.ru> wrote in message
news:#N**************@TK2MSFTNGP12.phx.gbl...
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_PRI NTPREVIEW,SHDocVw.OLECMDEX
ECOPT.OLECMDEXECOPT_DODEFAULT,ref pv, ref pva);

Its work.
#Hai wrote:
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 ?

Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.