Chapter 4 Working with Menus, Toolbars, and Dialog Boxes 115
- Click the Start Debugging button on the Standard toolbar.
The program runs, and the Clock menu and the toolbar appear at the top of the screen.
- On the form’s toolbar, click Open.
The Open dialog box opens. It looks great, doesn’t it? (In other words, it looks just like
a regular Windows application .) Notice the Bitmaps (* .bmp) entry in the dialog box. You
defined this entry with the statement
OpenFileDialog1.Filter = "Bitmaps (*.bmp)|*.bmp"
in the OpenToolStripButton_Click event procedure. The first part of the text in quotes—
Bitmaps (* .bmp)—specifies which items are listed in the Files Of Type box. The second
part—* .bmp—specifies the file name extension of the files that are to be listed in the
dialog box.
- Open a folder on your system that contains bitmap images. I’m using the color toolbar
button I’ve used in this chapter (located in C:\Vb10sbs\Chap04), but you can display any
.bmp file on your system. - Select the bitmap file in the Open dialog box, and then click the Open button.
A picture of the bitmap appears in the picture box. My form looks like this:
Now you’ll practice using the Clock menu.
- On the Clock menu, click the Time command.
The current time appears in the label box.