Click to See Complete Forum and Search --> : Previewing an HTML Page
Fabien
Aug 20th, 2000, 02:01 PM
I'd like to programmize a function to preview a Web Page and I'd like the result to look like the Windows 98 Explorer HTML preview. How can I do ?
Thanks a lot !
I am not sure about VB6 but Click Project > Components (ctrl + t) > Microsoft Internet Tools. Check it and add it to your form. It is now the Webbrowser Control.
And here is how to use it:
Private Sub Form_Load()
Webbrowser1.Navigate "http://www.vb-world.net"
End Sub
If you want the source of that html file to be in a Textbox:
Text1.Text = Webbrowser1.Document.documentElement.innerHTML
I think he wants to Preview it, you know, make it small.
I knew that Dennis..I was jus' testing you :).
Well, I looked in the Object Browser and here is what I found: OLECMDID_PRINTPREVIEW
How to use it:
WebBrowser1.ExecWB OLECMDID_PRINTPREVIEW,OLECMDEXECOPT_PROMPTUSER
AAAH! I knew there had to be a use for that thing called the object browser ;)
S@NSIS
Aug 21st, 2000, 06:34 AM
Hi,
This is the same sort of thing that I have been looking for, but how do I use it? I keep getting the error message:
Method 'ExecWB' of object 'IwebBrowser2' failed.
What do I have to do to get the preview?
Cheers,
Shaun
Fabien
Aug 21st, 2000, 07:51 AM
I'd like to thank all of you and I'm gonna try this immediately !!!
Fabien.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.