stop refresh of drawing
-
i have to draw pie chart on my application run time.i used this way. create a graphic object and then draw lines. my problem is when from minimize or other form come over that from,drawing is refreshing(erasing) is there a way to prevent this.
-
i have to draw pie chart on my application run time.i used this way. create a graphic object and then draw lines. my problem is when from minimize or other form come over that from,drawing is refreshing(erasing) is there a way to prevent this.
No - you need instead to do it properly - draw it in your paint handler.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog
-
i have to draw pie chart on my application run time.i used this way. create a graphic object and then draw lines. my problem is when from minimize or other form come over that from,drawing is refreshing(erasing) is there a way to prevent this.
You don't stop this. You actually need to have this! When another window is dragged acrossed your chart, it has to repaint itself. Put all of your drawing code in the Paint event of the control you're drawing this chart on and it'll do just that.
Dave Kreskowiak Microsoft MVP - Visual Basic
-
No - you need instead to do it properly - draw it in your paint handler.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog
I have no idea why some idiot voted you a 1...
Dave Kreskowiak Microsoft MVP - Visual Basic
-
I have no idea why some idiot voted you a 1...
Dave Kreskowiak Microsoft MVP - Visual Basic
*grin* Good advice often attracts low votes, because what people want is a slab of code that works despite violating how Windows itself functions :-)
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog
-
i have to draw pie chart on my application run time.i used this way. create a graphic object and then draw lines. my problem is when from minimize or other form come over that from,drawing is refreshing(erasing) is there a way to prevent this.
Putting the code in the event is one way of doing it and probably the best way if your pie chart is constantly changing. Another way would be to create a bitmap object and set the image propertie to the bitmap and it windows will handle the redrawing for you but you should really try doing it the correct way.
Recreating the wheel is the best way to appreciate what the previous coders have gone through to get you where you are at now.