C# drawing(with gdi+)

micon

Member
Joined
Jul 4, 2003
Messages
5
Hey,
Im using C# for my app, and im using GDI+. With GDI the drawing functions always seem to be in the on_paint method of the Form your drawing to. Is there a way i can call the drawing functions from another class? or another method / function within the same class? Thanks a bunch. -micon
 
In the Paint procedure call MyOtherClass.DoPaint(e.Graphics);. If youre making a game or need to continually redraw the screen in a loop you can use the .CreateGraphics method of the form to get a Graphics object
 
Call the controls Invalidate method - that will mark it to be redrawn next time the application is idle.
 
Back
Top