PC Review


Reply
Thread Tools Rate Thread

Custom Control Resize and Paint

 
 
Andy Wynn
Guest
Posts: n/a
 
      16th Jan 2007
I have a custom control that has a rectangle drawn at the bottom of the
control. Nothing fancy, just a rectangle with a color fill. The
control has the ability to be resized ( Collapsed - Expanded). Each
time the control is resized, the rectangle needs to be redrawn in its
proper location. The probem is that the resize event fires and
finishes before the Paint event can redraw the rectangle, giving me a
very nasty flicker.

I have these styles set:

SetStyle(ControlStyles.ResizeRedraw, true);
SetStyle(ControlStyles.AllPaintingInWmPaint, true);
SetStyle(ControlStyles.UserPaint, true);
SetStyle(ControlStyles.DoubleBuffer, true);
SetStyle(ControlStyles.ContainerControl, true);

I've tried both true and false for ResizeRedraw.

I would think there is a fairly simple answer for this, but its lost on
me at this point.

Any help would be greatly appreciated.

Andy

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compound Custom Control - How to Trap Resize in Design Mode Stewart Berman Microsoft C# .NET 9 2nd Dec 2008 04:58 AM
Custom control renders table but doesn't resize at design time. Chubby Arse Microsoft ASP .NET 0 6th Oct 2005 11:18 AM
UML Object Model For A User/Custom Control Containing An Extended WinForms DataGrid - Best Practices For Paint, DataGridTableStyle GridColumnStyles, etc. Richard Microsoft C# .NET 0 21st Mar 2005 02:46 PM
Custom Control Text Paint Nathan Carroll Microsoft VB .NET 1 10th Jun 2004 10:16 AM
listview and columnheader resize issue inside a custom control simion tishler via .NET 247 Microsoft Dot NET Framework Forms 0 28th Apr 2004 02:29 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:56 AM.