gdi+ problem
C#
3
Posts
3
Posters
0
Views
1
Watching
-
i draw some rectangle into my form and when i minize the rectangles disappeared how to slove this problem ?
Are you using the OnPaint event, and drawing it every time the form repaints?
-
i draw some rectangle into my form and when i minize the rectangles disappeared how to slove this problem ?
1.Overide OnPaint Event and write all the painting algorithm inside this. 2. Use graphics object obtained from PaintEventArgs's Graphics property. This will ensure non-flickering during painting.
protected override void OnPaint ( System.Windows.Forms.PaintEventArgs e )
{
Graphics g = e.Graphics;
//write your painting algorithm here...}
Do revert back whether it could solve your problem or not? Regards, Jay.