Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
C# Helper...
 
XML RSS Feed
Follow VBHelper on Twitter
 
 
 
MSDN Visual Basic Community
 
 
 
 
 
TitlePreview and print the contents of the WebBrowser control
DescriptionThis example shows how to preview and print the contents of the WebBrowser control in Visual Basic 6. The program uses the WebBrowser control's ExecWB to make it preview and print.
KeywordsWebBrowser, print, print preview, preview
CategoriesControls, Graphics
 
Thanks to James Hansen.

The program calls the browser's ExecWB method, passing it the parameter OLECMDID_PRINTPREVIEW for a print preview and OLECMDID_PRINT to print.

 
Private Sub cmdPreview_Click()
    WebBrowser1.ExecWB _
        OLECMDID_PRINTPREVIEW, _
        OLECMDEXECOPT_DONTPROMPTUSER
End Sub

Private Sub cmdPrint_Click()
    WebBrowser1.ExecWB _
        OLECMDID_PRINT, _
        OLECMDEXECOPT_DONTPROMPTUSER
End Sub
 
 
Copyright © 1997-2010 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated