Friday, January 07, 2005

Printing using web browser control

Printing would not be much of a problem. Load it into a webbrowser control on the form and then print the webbrowser control using the command

webbrowser1.ExecWB(SHDocVw.OLECMDID.OLECMDID_PRINT, SHDocVw.OLECMDEXECOPT.OLECMDEXECOPT_DONTPROMPTUSER)

There might be a similar command to open up the print preview dialog box also

check out this link for more info
http://msdn.microsoft.com/workshop/browser/webbrowser/reference/methods/execwb.asp

No comments: