Chapter 2. Building Smart Client User Interfaces

In This Chapter

  • Customizing Windows interfaces

  • Using dialog boxes

  • Adding menus and toolbars

  • Inheriting from a base Windows Form

  • Laying out controls in a Windows Form

Using Visual Studio to build Windows applications gives you a head start in your race against project deadlines. This chapter offers tools and techniques you can use to transform Visual Studio's out-of-the-box Windows projects into Windows applications that could make Bill Gates proud. In this chapter, you see most examples in VB and C#.

Building the Windows Container

As the container that holds your controls, the Windows Form is one of the most important elements in building Windows applications. The Windows Form is your application's foundation, and it's highly customizable.

The following sections explore some properties and controls that you can use to modify how your Windows Forms look and behave.

Setting common form properties

You can probably spot a typical Windows Form from ten paces:

  • It usually has the familiar little red Close button in its upper-right corner.

  • If it's like most windows, it has menus and toolbars.

  • It's displayed on the taskbar along the bottom of the screen.

All these features of a typical window are determined by properties. Simply turning a property on or off can give a Windows Form a complete makeover. The default Windows Form that Visual Studio creates in all new Windows projects has most of these typical properties. You have to set some properties, such ...

Get Visual Studio® 2010 All-in-One For Dummies® now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.