Click here to Skip to main content
15,894,291 members
Home / Discussions / C#
   

C#

 
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 
Questionautoscroll with mousewheel Pin
Danzy8331-Mar-12 9:26
Danzy8331-Mar-12 9:26 
AnswerRe: autoscroll with mousewheel Pin
Luc Pattyn31-Mar-12 9:35
sitebuilderLuc Pattyn31-Mar-12 9:35 
GeneralRe: autoscroll with mousewheel Pin
Danzy8331-Mar-12 10:06
Danzy8331-Mar-12 10:06 
AnswerRe: autoscroll with mousewheel Pin
Luc Pattyn31-Mar-12 10:27
sitebuilderLuc Pattyn31-Mar-12 10:27 
QuestionCode for solving CHESS problems? Pin
Bill Sinclair31-Mar-12 7:40
Bill Sinclair31-Mar-12 7:40 
AnswerRe: Code for solving CHESS problems? Pin
André Kraak31-Mar-12 8:12
André Kraak31-Mar-12 8:12 
GeneralRe: Code for solving CHESS problems? Pin
Bill Sinclair1-Apr-12 5:12
Bill Sinclair1-Apr-12 5:12 
AnswerRe: Code for solving CHESS problems? Pin
Luc Pattyn31-Mar-12 8:38
sitebuilderLuc Pattyn31-Mar-12 8:38 
GeneralRe: Code for solving CHESS problems? Pin
Bill Sinclair1-Apr-12 5:07
Bill Sinclair1-Apr-12 5:07 

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.