Click here to Skip to main content
15,908,173 members
Home / Discussions / C#
   

C#

 
Questionhow to reduce the size of exe File ... Pin
nassimnastaran1-Apr-12 8:41
nassimnastaran1-Apr-12 8:41 
AnswerRe: how to reduce the size of exe File ... Pin
DaveyM691-Apr-12 9:45
professionalDaveyM691-Apr-12 9:45 
AnswerRe: how to reduce the size of exe File ... Pin
RobCroll1-Apr-12 14:46
RobCroll1-Apr-12 14:46 
GeneralRe: how to reduce the size of exe File ... Pin
PIEBALDconsult1-Apr-12 16:52
mvePIEBALDconsult1-Apr-12 16:52 
GeneralRe: how to reduce the size of exe File ... Pin
RobCroll1-Apr-12 17:33
RobCroll1-Apr-12 17:33 
GeneralRe: how to reduce the size of exe File ... Pin
Pete O'Hanlon1-Apr-12 23:00
mvePete O'Hanlon1-Apr-12 23:00 
GeneralRe: how to reduce the size of exe File ... Pin
RobCroll2-Apr-12 12:20
RobCroll2-Apr-12 12:20 
GeneralRe: how to reduce the size of exe File ... Pin
nassimnastaran2-Apr-12 5:27
nassimnastaran2-Apr-12 5:27 
GeneralRe: how to reduce the size of exe File ... Pin
Pete O'Hanlon3-Apr-12 1:58
mvePete O'Hanlon3-Apr-12 1:58 
AnswerRe: how to reduce the size of exe File ... Pin
PIEBALDconsult1-Apr-12 16:51
mvePIEBALDconsult1-Apr-12 16:51 
JokeRe: how to reduce the size of exe File ... Pin
Peter_in_27801-Apr-12 17:53
professionalPeter_in_27801-Apr-12 17:53 
AnswerRe: how to reduce the size of exe File ... Pin
Eddy Vluggen1-Apr-12 23:52
professionalEddy Vluggen1-Apr-12 23:52 
Questionhandling of paint event Pin
Danzy8331-Mar-12 22:37
Danzy8331-Mar-12 22:37 
AnswerRe: handling of paint event Pin
Eddy Vluggen1-Apr-12 0:25
professionalEddy Vluggen1-Apr-12 0:25 
Questionhow to get remote interface type Pin
Member 768759431-Mar-12 22:08
Member 768759431-Mar-12 22:08 
AnswerRe: how to get remote interface type Pin
Richard Andrew x641-Apr-12 5:45
professionalRichard Andrew x641-Apr-12 5:45 
QuestionPrinting Envelopes from Manual Feed Pin
tip2tail31-Mar-12 10:05
tip2tail31-Mar-12 10:05 
Hi there,

Really stumped with being able to Print an envelope from my C# WinForms application.

At the moment we print from Word with the document size/type set up as a C5 or a DL envelope. When printed the printer will request a C5 or DL envelope to be placed into the manual document feeder before printing.

I want the application to be able to do the same but at the moment I am having no luck. Here is the code I am using:

Code:
C#
/* aPD is a PrintDocument object */
aPD.DefaultPageSettings.Margins = new System.Drawing.Printing.Margins(0, 0, 0, 0);
if (radSizeDL.Checked)
{
    aPD.DefaultPageSettings.PaperSize = new System.Drawing.Printing.PaperSize("DL Envelope", 220, 110);
    aPD.DefaultPageSettings.PaperSize.PaperName = System.Drawing.Printing.PaperKind.DLEnvelope.ToString();
}
else
{
    aPD.DefaultPageSettings.PaperSize = new System.Drawing.Printing.PaperSize("C5 Envelope", 229, 162);
    aPD.DefaultPageSettings.PaperSize.PaperName = System.Drawing.Printing.PaperKind.C5Envelope.ToString();
}
aPD.DefaultPageSettings.Landscape = true;
aPD.OriginAtMargins = true;

aPD.PrinterSettings.Copies = Convert.ToInt16(numCopies.Value);

aPD.Print();


I am quite happy to upload the code for anyone to see if they can help me?

Please help!

Thanks.
AnswerRe: Printing Envelopes from Manual Feed Pin
Wes Aday31-Mar-12 12:35
professionalWes Aday31-Mar-12 12:35 
GeneralRe: Printing Envelopes from Manual Feed Pin
tip2tail31-Mar-12 12:44
tip2tail31-Mar-12 12:44 
GeneralRe: Printing Envelopes from Manual Feed Pin
Wes Aday31-Mar-12 12:49
professionalWes Aday31-Mar-12 12:49 
GeneralRe: Printing Envelopes from Manual Feed Pin
tip2tail31-Mar-12 13:08
tip2tail31-Mar-12 13:08 
GeneralRe: Printing Envelopes from Manual Feed Pin
Wes Aday31-Mar-12 13:14
professionalWes Aday31-Mar-12 13:14 
RantRe: Printing Envelopes from Manual Feed Pin
tip2tail31-Mar-12 13:24
tip2tail31-Mar-12 13:24 
GeneralRe: Printing Envelopes from Manual Feed Pin
Wes Aday31-Mar-12 13:42
professionalWes Aday31-Mar-12 13:42 
GeneralRe: Printing Envelopes from Manual Feed Pin
Richard MacCutchan31-Mar-12 21:12
mveRichard MacCutchan31-Mar-12 21:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.