Webbrowser Class and printing

  • Thread starter Thread starter Victor Rodriguez
  • Start date Start date
V

Victor Rodriguez

Is there a way to set the default printing and the orientation by Code using
the webbrowser class?

Thanks,

Victor
 
Hi Victor,

Thank you for posting.

If you want to specify header and footer values and other page settings
prior to printing, you could call the ShowPageSetupDialog method of the
WebBrowser class.

You can add two buttons on your form. One button is for page settings and
the other button is for printing. In the page setting button's Click event
handler, you can call the WebBrowser.ShowPageSetupDialog method which opens
the Internet Explorer Page Setup dialog box. Users can set the page
settings in this dialog box. And in the printing button's Click event
handler, you can call the WebBrowser.Print method to print the current web
page with the current page settings.

If you have anything unclear, please don't hesitate to get in touch.


Sincerely,
Linda Liu
Microsoft Online Community Support

====================================================
When responding to posts,please "Reply to Group" via
your newsreader so that others may learn and benefit
from your issue.
====================================================
 
Back
Top