Click here to Skip to main content
15,891,607 members
Home / Discussions / C#
   

C#

 
AnswerRe: Moved from Q/A (originally posted by dmpinusa): Centralizing Exception Handling Code Pin
Rhys Gravell21-Nov-10 23:57
professionalRhys Gravell21-Nov-10 23:57 
Questiondatetimepicker with multiple selected dates Pin
ajithnamboodiri18-Nov-10 19:58
ajithnamboodiri18-Nov-10 19:58 
AnswerRe: datetimepicker with multiple selected dates Pin
Mycroft Holmes18-Nov-10 20:46
professionalMycroft Holmes18-Nov-10 20:46 
AnswerRe: datetimepicker with multiple selected dates Pin
RobCroll19-Nov-10 0:55
RobCroll19-Nov-10 0:55 
AnswerRe: datetimepicker with multiple selected dates Pin
Gregory Gadow19-Nov-10 9:40
Gregory Gadow19-Nov-10 9:40 
AnswerRe: datetimepicker with multiple selected dates Pin
thatraja20-Nov-10 2:13
professionalthatraja20-Nov-10 2:13 
QuestionPrint a data using GDI object in windows form Pin
ragupathi.p18-Nov-10 17:55
ragupathi.p18-Nov-10 17:55 
AnswerRe: Print a data using GDI object in windows form Pin
Luc Pattyn18-Nov-10 18:26
sitebuilderLuc Pattyn18-Nov-10 18:26 
ragupathi.p wrote:
/languagelevel where {pop languagelevel} {1} ifelse dup 2 ge {currentglobal ex
0 0 10 6 [] 0 1 GpPBeg
0.0039 0.0039 0.0039 SC
NP Printing from Windows form
300 240 m 3300 240 1 330 1140 1 300 1140 1 CP
S
GSE


That stuff is raw PostScript code, the language used between your PC and your particular printer. Normally the printer interprets this textual information and only prints what is intended to be printed; the remainder being formatting, positioning, etc. (actually PostScript is a pretty complete programming language).

If you're saying the text shows as intended when only e.Graphics.DrawString() is present, and everything gets messed up when you do
e.Graphics.DrawRectangle(Pens.Black, rect);
e.Graphics.DrawString("Printing from Windows form",new Font("Arial",10,FontStyle.Bold ), Brushes.Black, recf);

then something is rotten, and it ain't your C# code. However I can't tell you what it is. Check your printer driver, does it match your printer? is it up-to-date? check your cable. Reset your printer and reboot your PC. If the mess is identical every time, it must be a bug. Experiment a bit with more lines of text, with different coordinates, fonts, whatever. Assuming nothing gives any improvement, start googling.

FWIW: if you need more proof your C# code is good, try printing to another printer. Maybe install a "PDF writer" which basically is a driver that emulates a printer and creates a PDF document, which you then can see on your screen. It will look all right!

Smile | :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.


GeneralRe: Print a data using GDI object in windows form Pin
ragupathi.p22-Nov-10 19:24
ragupathi.p22-Nov-10 19:24 
QuestionVersioning Question Pin
Richard Andrew x6418-Nov-10 13:51
professionalRichard Andrew x6418-Nov-10 13:51 
AnswerRe: Versioning Question PinPopular
Luc Pattyn18-Nov-10 14:14
sitebuilderLuc Pattyn18-Nov-10 14:14 
GeneralRe: Versioning Question Pin
Richard Andrew x6418-Nov-10 14:18
professionalRichard Andrew x6418-Nov-10 14:18 
GeneralRe: Versioning Question Pin
Luc Pattyn18-Nov-10 14:32
sitebuilderLuc Pattyn18-Nov-10 14:32 
AnswerRe: Versioning Question Pin
Dave Kreskowiak18-Nov-10 15:25
mveDave Kreskowiak18-Nov-10 15:25 
GeneralRe: Versioning Question Pin
Richard Andrew x6418-Nov-10 15:29
professionalRichard Andrew x6418-Nov-10 15:29 
AnswerRe: Versioning Question Pin
Bernhard Hiller21-Nov-10 23:22
Bernhard Hiller21-Nov-10 23:22 
Questiongetting data over website Pin
Erdinc2717-Nov-10 21:51
Erdinc2717-Nov-10 21:51 
AnswerRe: getting data over website Pin
Pete O'Hanlon17-Nov-10 23:10
mvePete O'Hanlon17-Nov-10 23:10 
GeneralRe: getting data over website Pin
Erdinc2717-Nov-10 23:18
Erdinc2717-Nov-10 23:18 
GeneralRe: getting data over website Pin
Pete O'Hanlon17-Nov-10 23:49
mvePete O'Hanlon17-Nov-10 23:49 
GeneralRe: getting data over website Pin
Lutosław18-Nov-10 4:09
Lutosław18-Nov-10 4:09 
GeneralRe: getting data over website Pin
Pete O'Hanlon18-Nov-10 4:16
mvePete O'Hanlon18-Nov-10 4:16 
GeneralRe: getting data over website PinPopular
Lutosław18-Nov-10 5:18
Lutosław18-Nov-10 5:18 
GeneralRe: getting data over website Pin
Pete O'Hanlon18-Nov-10 9:28
mvePete O'Hanlon18-Nov-10 9:28 
GeneralRe: getting data over website Pin
Lutosław18-Nov-10 12:57
Lutosław18-Nov-10 12:57 

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.