Chapter 4 Working with Menus, Toolbars, and Dialog Boxes 103
- Set the following properties for the label:
Object Property Setting
Label1 AutoSize
BorderStyle
Font
Text
TextAlign
False
FixedSingle
Microsoft Sans Serif, Bold, 24-point
(empty)
MiddleCenter
- Resize the label object so that it is much larger (it will be holding clock and date values),
and position it in the center of the form. Your form should look similar to the following:
Now you’ll add program statements to the Time and Date event procedures to process the
menu commands.
Note In the following exercises, you’ll enter program code to process menu choices. It’s OK if
you’re still a bit hazy on what program code does and how you use it—you’ll learn much more
about program statements in Chapters 5 through 7.
Edit the menu event procedures
- Click the Clock menu on the form to display its commands.
- Double-click the Time command in the menu to open an event procedure for the
command in the Code Editor.
The TimeToolStripMenuItem_Click event procedure appears in the Code Editor. The
name TimeToolStripMenuItem_Click includes the name “Time” that you gave this menu
command. The words ToolStripMenuItem indicate that in its underlying technology, the