WIZARDS

One common type of dialog box is called a wizard. A wizard is a form that guides the user through a series of steps to do something. For example, building a database connection is complicated, so Visual Basic provides a data connection configuration wizard that helps the user enter the correct information for different kinds of databases. When it finishes, the wizard adds a connection object to the current form.

Figure 9-3 shows one kind of wizard. The user enters data on each tab and then moves on to the next one. This wizard asks the user to enter an employee’s name, identification (Social Security number and Employee ID), address and phone number, office location and extension, and privileges. Many tabbed wizards also include Next and Previous buttons to help you move from one tab to another.

FIGURE 9-3: A wizard guides the user through the steps of some complicated task.

image

When the user has filled in all the fields, the wizard enables the OK button. When the user clicks the OK or Cancel button, control returns to the main program, which handles the result just as it handles any other dialog box.

Figure 9-4 shows a different style of wizard. Instead of tabs, it uses buttons to let the user move through pages of fields. The wizard enables a button only when the user has filled in the necessary information on the previous page. In Figure 9-4, the Office button is disabled because the user has not filled in all the fields on the Address page.

FIGURE 9-4: This wizard uses buttons instead of tabs to move through its pages of data.

image

The button style is sometimes better at helping the user fill in all of the required fields because the user must finish filling in one page before moving on to the next. In a tabbed wizard, the user might leave a required field blank or use an incorrect format (for example, an invalid phone number) on the first tab and not realize it until clicking the OK button.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.29.151