|
|
Title | Preview and print the contents of the WebBrowser control |
Description | This 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. |
Keywords | WebBrowser, print, print preview, preview |
Categories | Controls, 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
|
|
|
|
|
|