Results 1 to 7 of 7

Thread: Previewing an HTML Page

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2000
    Posts
    2
    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 !


  2. #2
    Guest
    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:
    Code:
    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:

    Code:
    Text1.Text = Webbrowser1.Document.documentElement.innerHTML

  3. #3
    Guest
    I think he wants to Preview it, you know, make it small.

  4. #4
    Guest
    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:

    Code:
    WebBrowser1.ExecWB OLECMDID_PRINTPREVIEW,OLECMDEXECOPT_PROMPTUSER

  5. #5
    Guest
    AAAH! I knew there had to be a use for that thing called the object browser


  6. #6
    Addicted Member S@NSIS's Avatar
    Join Date
    Aug 2000
    Location
    Stoke-On-Trent, England
    Posts
    243
    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
    Web/Application Developer
    VB6 Ent (SP5), Win 2000,SQL Server 2000

  7. #7

    Thread Starter
    New Member
    Join Date
    Aug 2000
    Posts
    2
    I'd like to thank all of you and I'm gonna try this immediately !!!

    Fabien.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width