SmartResize - a fairly simple Windows Forms sample

I wrote a simple class deriving from System.Windows.Forms.Form some time ago after listening to Shawn Burke’s DEV 394 talk from Tech-Ed U.S. It uses the application idle event to use CPU resources more sparingly when resizing a form. This can be useful if you’re deploying to clients with less than stellar machines, or if you have a large number of docked/anchored controls on a form. I probably should have called it “CheapResize” instead of “SmartResize” but that doesn’t sound quite as catchy.  It also adds “begin resize” and “end resize” events to the form. I couldn’t see any similar code on GotDotNet so I submitted it. Here it is. The SmartResize class is written in C#, and there are two demos (one in C# and one in VB.NET) which inherit from it. The catchy “I Love .NET” image in the C# sample was an image I created and then made into an iron on transfer for a T-Shirt.

Comments

carlos olavo lima
muito grato
3/07/2004 9:43:00 AM
carlos olavo lima
muito grato
3/07/2004 9:44:00 AM
carlos olavo lima
muito grato
3/07/2004 9:46:00 AM