smsurendar

How do use page setup dialog in visual c#



Re: Windows Forms General pagesetupdialog

ahmedilyas

Can you explain a bit more please

To show the dialog:

PageSetupDialog psd = new PageSetupDialog();

if (psd.ShowDialog() == DialogResult.OK)

{

//they pressed the OK button. Now do something

}

There are also a few properties in there which you can get or set the values before showing the dialog. Take a look at this:

http://msdn2.microsoft.com/en-us/library/system.windows.forms.pagesetupdialog(VS.71).aspx

If you can explain more in depth on what you would like to do, you will get a better response :-)






Re: Windows Forms General pagesetupdialog

smsurendar

how do print all the contents in the form... my contents are outof screen..





Re: Windows Forms General pagesetupdialog

ahmedilyas

The more detail the better it is for us to help.

To print your form, you would need the Draw on a page, the items you wish to print (PrintDocument)

http://msdn2.microsoft.com/en-us/library/system.drawing.printing.printdocument(VS.71).aspx

There is also an example in the link above with the documentation, it's not as easy as you may think but certainly very flexible on what you can print and how to print it on the page :-)






Re: Windows Forms General pagesetupdialog

smsurendar

i did some graphics in panel... that is my content





Re: Windows Forms General pagesetupdialog

Gavin Jin - MSFT

Hi,if you want to print graphics,please read this article.

http://www.codeproject.com/useritems/PrintBasics.asp

This article will teach you the basics of printing text and graphics with the Print Document, Print Dialog, Print Preview and Page Setup Control.

With Regards