>>void ClientControl_Paint(object sender,PaintEventArgs e) >>{ >> e.Graphics.TextRenderingHint = TextRenderingHint.AntiAlias; >> // draw your stuff here >>} >> >>No it wasn't suggested but I noticed in the form that always worked first time - this line was present so in desperation I added it - I can't for the life of me think why this should make a difference but I've tested it to death and it does. As I said in an earlier post the font was 'magically' copied to the Windows\Font folder , so I deleted the font file and ran the form without the *new* line of code and sure enough the problem returned, I then repeated the process ( with the *new* line ) and voila ! it worked perfectly. WEIRD !!!. Don't know if this pertinent , but the form that *always* worked is a normal Winform whilst the other is an MDIContainer and you do have to jump through hoops to draw on it, firstly you have to get a reference to the MdiClient like this:
// In the forms load event foreach(Control c in this.Controls) { if(c is MdiClient) { this.ClientControl = c; \\ ClientControl is a field in my form class. this.ClientControl.Paint+= MyPaintMethod; break; } }I don't understand the difference though :-(