Changes

Jump to: navigation, search

Drawing Graphics in C Sharp

1 byte removed, 16:41, 30 January 2008
Persistent Graphics
An important point to note before proceeding with is chapter is that simply creating a Graphics Object for a component and they drawing on that component does not create persistent graphics. In fact what will happen is that as soon as the window is minimized, or obscured by another window the graphics will be erased.
Fore For this reason, steps need to be taken to ensure that any graphics are persistent. Two mechanisms for achieving this to perform the drawing in the ''Paint()'' event handler of the control, or to perform the drawing on a bitmap image in memory and then transfer that image to the component whenever the ''Paint()'' event is triggered (which occurs whenever the control is displayed or unobscured). We will look at using the Paint() event in this chapter and [[Using Bitmaps for Persistent Graphics in C Sharp|Using Bitmaps for Persistent Graphics in C#]] in the next chapter.
== Creating a Graphics Object ==

Navigation menu