20.5 Adding User-Interface Dialogs

 <  Day Day Up  >  

20.5 Adding User -Interface Dialogs

You want to add dialogs to the setup user interface, for example, to display additional information or to ask the user questions about installation preferences.


Technique

In the User Interface Editor, select the point in the setup process at which you want your dialog to appear. As shown in Figure 20.10, the options are Start (before installation commences), Progress (during the installation) and End (after the installation is complete), although, in practice Start and End are normally the only sensible points at which to add new dialogs. Right-click on the appropriate section and select Add Dialog from the context menu. You see a dialog box inviting you to select from a number of dialog templates.

Figure 20.11 shows the 14 different dialog templates you can choose.

  • Three radio button dialogs, from which the user can select between mutually exclusive options using radio buttons

  • Three check box dialogs, from which the user can select one or more options using check boxes

  • Three text box dialogs, from which the user can supply information using a number of text boxes (up to three per dialog)

  • A customer-information dialog

  • A license-agreement dialog

  • A read-me dialog asking whether the user wants to view a read-me file

  • A register-user dialog offering a registration URL

  • A splash screen

Figure 20.11. Choosing a dialog to add to the setup user interface.

graphics/20fig11.gif

Just as with the standard dialogs, there is limited support for customization of the additional dialogs using the VS.NET Properties Window. Note, however, that you can customize each additional dialog only once. So it's not possible, for example, to have two different splash screens.

You simply select the required dialog, whereupon it is added to the user interface as the last dialog in the chosen section. For example, if we try to add a License Agreement dialog to the Start section, it will be placed after the Confirm Installation dialog.

Of course, following the Confirm Installation dialog is not the best of places to display a license agreement. You probably want the user to see the license agreement immediately after the Welcome dialog. If you right-click on any of the dialogs in the User Interface Editor treeview, you see Move Up and Move Down menu items in the context menu, which you can use to reorder them, or you can simply drag it to the appropriate location with the mouse.

Having added the required dialog, all you need to do is select it in the User Interface Editor and then use the VS.NET Properties Window to set the customizable aspects of that dialog. In the case of the license agreement, you can change the banner bitmap, whether the text appears sunken, and the text file that contains the license agreement to be displayed. (Note that it must be a file that you have already added to the list of files to be installed using the File System Editor.)

Comments

Although there is support for customizing these dialogs, it is fairly limited.

Several of the additional dialogs require input from the user. VS.NET does provide a means to make user-supplied data available to the installer so you can customize the installation process based on user choices. This aspect is covered in Recipe 20.7, "Conditionally Installing Files."

 <  Day Day Up  >  


Microsoft Visual C# .Net 2003
Microsoft Visual C *. NET 2003 development skills Daquan
ISBN: 7508427505
EAN: 2147483647
Year: 2003
Pages: 440

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