Setting Form and Control Properties

As you’ve seen in all the examples so far, both forms and form controls have a multitude of properties that control their behavior. You can initialize the value of many such properties in the Windows Form Designer, and you can change them from code as well. Figure 9-2, for example, shows the properties that Visual Studio .NET can initialize at design time.

This version of the Properties window shows the settings Windows Form Designer can initialize for a PictureBox control.

Figure 9-2. This version of the Properties window shows the settings Windows Form Designer can initialize for a PictureBox control.

Figure 9-3 shows what happens when you type the name of a PictureBox and a period in Visual Studio .NET’s Code Editor. The IntelliSense ...

Get Faster Smarter Beginning Programming 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.