Allows you to build applications similar to Windows Explorer, with a tree-like display on the left pane and a detailed view on the right pane.
Displays an About window listing detailed information (such as version number, copyright, credits, etc.) about the current application.
Creates a standard login window to simplify the task of user authentication.
Displays a welcome screen when your application is launched.
In this section, you will add an About box to your application using the About Box template. The About box for an application is displayed when a user selects Help → About… and contains useful information about the application, including its manufacturer and version number. Much of the information in the About box is available from the application and its configuration files.
First, you need to create an About box form. Right-click on the project name (
WindowsApplication1) in Solution Explorer and select Add New Item…. Select the About Box template and accept the default name of AboutBox1.vb provided by Visual Studio 2005. Click Add (see Figure 1-27).
The AboutBox1.vb form will be added to your project, and Visual Studio 2005 will display a designer for the feature as shown in Figure 1-28.
Let's personalize the form by adding an image of the cover for this book to replace the default pretzel-like image. Click the
LogoPictureBox control and then, in the Property window for the control, click the "…" button of its Image property. This will display the Select Resource dialog window. Click the Import… button of the dialog to select your own image for the About box (C:\vbjumpstartpg.gif). Click OK (see Figure 1-29).
You can download the vbjumpstartpg.gif image from: http://www.oreilly.com/catalog/vbjumpstart/.
To configure the information about your application so that it can be displayed by the About box, right-click on the project name in Solution Explorer and then select Properties. In the Application tab, click on the Assembly Information… button (see Figure 1-30).
Set the information as shown in Figure 1-31.
The AboutBox1 window should now look like the one shown in Figure 1-32.
To link Form1 with the AboutBox1 window, expand the Help menu and double-click on the About… menu item (see Figure 1-33) to open the code-behind page for Form1 and generate a code stub for the About box selection event handler.
Now add the line of code shown in bold to the code stub generated by Visual Studio, as shown in Example 1-4). You use the
ShowDialog method of the dialog window to get the object display itself.
Finally, it's time to take your work for a trial run. Press F5 to run the application. Click Help → About… and you will see the About box shown in Figure 1-34.