Chapter 4. Windows Forms Designer

The Windows Forms Designer allows you to design forms for typical Windows applications. It lets you add, size, and move controls on a form. Together with the Properties window, it also lets you change a control's properties to determine its appearance and behavior.

This chapter provides an introduction to the Windows Forms Designer. It explains how to add controls to a form, move and size controls, set control properties, and add code to respond to control events. It also describes tips and tricks that make working with controls easier.

SETTING DESIGNER OPTIONS

When you first install Visual Studio, the Windows Forms Designer is configured to be quite usable. You can immediately open a form and use the Toolbox to place controls on it. You can use the mouse to move and resize controls. You can use the Format menu to arrange and size controls. Overall the Windows Forms Designer provides a first-class intuitive WYSIWYG ("what you see is what you get") experience.

Behind the scenes, however, there are a few configuration options that control the Designer's behavior and that you should know about to get the most out of the Designer.

To view the Designer's options, open the Tools menu, select Options, open the Windows Forms Designer branch, and select the General page to display the dialog shown in Figure 4-1.

This dialog lets you control the Windows Forms Designer's behavior.

Figure 4.1. This dialog lets you control the Windows ...

Get Visual Basic® 2010 Programmer's Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.