Click here to Skip to main content
15,910,210 members
Home / Discussions / C#
   

C#

 
QuestionWPF Window Location Pin
lost in transition 23-May-07 10:31
lost in transition 23-May-07 10:31 
AnswerRe: WPF Window Location Pin
led mike23-May-07 10:35
led mike23-May-07 10:35 
AnswerRe: WPF Window Location Pin
lost in transition 23-May-07 10:36
lost in transition 23-May-07 10:36 
QuestionWrite a character with a text writter Pin
Anka_Ame23-May-07 9:07
Anka_Ame23-May-07 9:07 
AnswerRe: Write a character with a text writter Pin
Tarakeshwar Reddy23-May-07 9:13
professionalTarakeshwar Reddy23-May-07 9:13 
AnswerRe: Write a character with a text writter Pin
Expert Coming23-May-07 9:17
Expert Coming23-May-07 9:17 
QuestionPrint an image by using C# Pin
lehoanglittle23-May-07 7:48
lehoanglittle23-May-07 7:48 
AnswerRe: Print an image by using C# Pin
Martin#23-May-07 8:09
Martin#23-May-07 8:09 
Hello,

The "System.Drawing.Printing" namespace will help you.
There you find the Installed printers : System.Drawing.Printing.PrinterSettings.InstalledPrinters
Then you need following classes for the setting:
PrinterSettings (Here you can set the printer name)
PrintDocument (There is the Print() method)

In your PrintDocument instance you have to handle the PrintPage event, which will be raised after you call "Print()".
The PrintPageEventArgs e has a Member Graphics, where you can draw your bitmap into:
e.Graphics.DrawImage(yourbitmapinstance,0,0);

P.S.: Instances of PrinterSettings and PrintDocument have to be Dispose(), to not waste memory!

Hope it helps!

All the best,

Martin

AnswerRe: Print an image by using C# Pin
Expert Coming23-May-07 9:12
Expert Coming23-May-07 9:12 
QuestionDataGrid: how disable select multi row with shift and arrow key Pin
zeroonea23-May-07 7:46
zeroonea23-May-07 7:46 
QuestionSFtp with .NET Pin
shiveta23-May-07 7:04
shiveta23-May-07 7:04 
AnswerDon't cross post message boards Pin
Dave Herren23-May-07 7:32
Dave Herren23-May-07 7:32 
AnswerRe: SFtp with .NET Pin
Judah Gabriel Himango23-May-07 11:14
sponsorJudah Gabriel Himango23-May-07 11:14 
GeneralRe: SFtp with .NET Pin
shiveta23-May-07 21:16
shiveta23-May-07 21:16 
QuestionHow to extract filename information from running processes ? Pin
adimangla23-May-07 4:57
adimangla23-May-07 4:57 
AnswerRe: How to extract filename information from running processes ? Pin
Martin#23-May-07 7:08
Martin#23-May-07 7:08 
QuestionUpdate on click Pin
CassT23-May-07 4:08
CassT23-May-07 4:08 
AnswerRe: Update on click Pin
Muammar©25-May-07 7:49
Muammar©25-May-07 7:49 
GeneralRe: Update on click Pin
CassT26-May-07 23:01
CassT26-May-07 23:01 
Questiontreeview doubleclick Pin
thepersonof23-May-07 3:53
thepersonof23-May-07 3:53 
AnswerRe: treeview doubleclick Pin
Giorgi Dalakishvili23-May-07 4:01
mentorGiorgi Dalakishvili23-May-07 4:01 
AnswerRe: treeview doubleclick Pin
PIEBALDconsult23-May-07 4:35
mvePIEBALDconsult23-May-07 4:35 
GeneralRe: treeview doubleclick Pin
Giorgi Dalakishvili23-May-07 5:25
mentorGiorgi Dalakishvili23-May-07 5:25 
GeneralRe: treeview doubleclick Pin
thepersonof23-May-07 9:17
thepersonof23-May-07 9:17 
QuestionBest practises: String table templates Pin
to_samGmbH23-May-07 3:42
to_samGmbH23-May-07 3:42 

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.