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.
====================================================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top