-----------------------------------------------------------

New Message on BDOTNET

-----------------------------------------------------------
From: shashijeevan
Message 1 in Discussion

Hi,   I am adding a Custom size print document and trying to print with my default 
printer.   I have created and successfully added the paper to the avilable papers list 
but I am not able set the default paper programatically. Its always picking up the 
settings configured from the Control Panel/Printers/Printing Preferences.   I do not 
want the user to set this but want to set it from my application.   I have used the 
following approach. Is there any problem with this one.    
  
PrintDocument pd = new PrintDocument(); 
PaperSize a=null; 
foreach(PaperSize ps in pd.PrinterSettings.PaperSizes) 
{ 
comboBox2.Items.Add(ps.PaperName); 
if(ps.PaperName.Equals("MyPaper")) 
a=ps; 
 
} 
pd.PrinterSettings.DefaultPageSettings.PaperSize = a; 
MessageBox.Show(pd.PrinterSettings.DefaultPageSettings.PaperSize.PaperName); 
This shows that the paper is 'MyPaper'. But what goes to printer is the default set 
from the control panel. 
please help 
regards, 
shashi

-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/bdotnet/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to