June 28th, 2010, 11:27 AM
Delete or updating GDI items
Pretty simple question here. If you use a gdi+ item to draw some text, how do you go back to it and update it or clear it.
protected override void OnPaint(PaintEventArgs pe)
Font fnt = new Font("Verdana", 16);
Graphics g = pe.Graphics;
// Main Title Bar
g.DrawString("SELECT OPERATIONAL MODE", fnt, new SolidBrush(Color.Yellow), 230, 50);
I don't see any means to remove or update something that was drawn.
Can someone give some input on my view of this problem and if possible, how to attack it?
June 28th, 2010, 01:27 PM
Re: Delete or updating GDI items
You draw it anew each time the method is called. Also, make sure to dispose of your font objects.
Click Here to Expand Forum to Full Width
This is a Codeguru.com survey!