Home > Samples > Update > August 2002
          Back to associated article: .NET Framework Makes Thick Clients More Attractive
  User Interface Improvements in Windows Forms (Illustration)    
   

0802nfmtcm_illo1.JPG (57881 bytes)

These three windows illustrate how Windows Forms can automatically adjust as the size of the window is changed.

On the top is a simple form with fields for an employee’s first and last name, a list of benefits the employee can select, and a button to update the changes.

The middle example shows how this window would look if it were resized without using Windows Forms’ automatic layout features (and is the same behavior users would see if the application were created with previous versions of Visual Basic). The window does become larger, but the additional space is useless because neither the list box nor the name fields become any larger.

On the bottom is the same form using Window’s Forms’ automatic layout. In this case, resizing the form causes several changes—the field for the employee last name becomes larger, allowing longer names to be fully visible; the list box becomes larger, allowing more items to be seen; and the Update button moves to the lower right corner. The developer achieves this effect by setting a few properties on the controls—no custom code needs to be written.