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 10-11 shows a typical 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.

image from book
Figure 10-11: A wizard guides the user through the steps of some complicated task.

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 10-12 shows a different style of wizard. Instead of tabs, it uses buttons to let the user move through its pages of fields. The wizard only enables a button when the user has filled in the necessary information on the previous page. In Figure 10-12, the Office button is disabled because the user has not filled in all the fields on the Address page.

image from book
Figure 10-12: This wizard uses buttons instead of tabs to move through its pages of data.




Visual Basic 2005 with  .NET 3.0 Programmer's Reference
Visual Basic 2005 with .NET 3.0 Programmer's Reference
ISBN: 470137053
EAN: N/A
Year: 2007
Pages: 417

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net