Home > Articles

  • Print
  • + Share This

Now What? Getting a Program to Do Something Useful

Okay, so I know how to get a program running. What's next?

Ah, now you get to go on a little personal power trip, because this section shows you how to boss around your programs. Specifically, you learn how to work with pull-down menus, toolbars, and dialog boxes.

Making It Go: Selecting Commands from Pull-Down Menus

Each program you work with has a set of commands and features that define the majority of what you can do with the program. Most of these commands and features are available via the program's drop-down menus. Oh sure, there are easier ways to tell a program what to do (I talk about some of them later in this chapter), but pull-down menus are special because they offer a complete road map for any program. This section gets you up to speed on this crucial Windows topic.

I'm going to use the My Computer program as an example for the next page or two. If you feel like following along, go ahead and launch the program by double-clicking the desktop's My Computer icon.

The first thing you need to know is that a program's pull-down menus are housed in the menu bar, the horizontal strip that runs just beneath the blue title bar. Figure 3.4 points out the menu bar in My Computer.

The Menu Bar

The gray strip that lies just south of the window title bar. Each word in the menu bar represents a pull-down menu.

The various items that run across the menu bar (such as File, Edit, and View in My Computer) are the names of the menus. To see (that is, pull down) one of these menus, use either of the following techniques:

  • Use your mouse to click the menu name. For example, click View to pull down the View menu.

  • Hold down the Alt key and press the underlined letter in the menu name. In Windows Explorer, for example, the "V" in View is underlined, so you pull down this menu by pressing Alt+V.

Bailing Out of a Menu

What do you do if you pull down a menu and then discover that you don't want to select any of its commands? You can remove the menu by clicking any empty part of the program's window, or you can pull down a different menu by clicking its name in the menu bar.

From the keyboard, you have two choices:

  • To get rid of the menu, press Alt by itself.

  • To pull down a different menu, press Alt plus the underlined letter of the new menu.

Figure 3.4 My Computer's View menu.

The various items you see in the menu are called commands. From here, you use any of the following techniques to select a command:

  • Use your mouse to click the command you want.

  • Use the up and down arrow keys to highlight the command, and then press Enter.

  • Press the underlined letter in the command. For example, the "R" in the View menu's Refresh command is underlined, so you can select this command by pressing R. (Go ahead and try this example; you won't hurt anything.)

Throughout this book, I tell you to select a pull-down menu command by separating the menu name and command name with a comma (,) like this: "Select the View, Refresh command."

What happens next depends on which command you picked. Here's a summary of the various possibilities:

  • The command runs without further fuss  This is the simplest scenario, and it just means that the program carries out the command, no questions asked. For example, clicking the Refresh command updates My Computer's display automatically.

  • Another menu appears  As shown in Figure 3.5, if you click the View menu's Arrange Icons command, a new menu—called a submenu —appears on the right (similar to what you saw when learning to navigate the Start menu). You then click the command you want to execute from the new menu.

  • The command is toggled on or off  Some commands operate like light switches: They toggle certain features of a program on and off. When the feature is on, a small check mark appears to the left of the command to let you know (see the Status Bar command in Figure 3.5). Selecting the command turns off the feature and removes the check mark. If you select the command again, the feature turns back on and the check mark reappears.

  • An option is activated  Besides having features that you can toggle on and off, some programs have features that can assume three or four different states. (I call them the "Three or Four Faces of Eve" features.) My Computer, for example, gives you four ways to display the contents of your computer, according to your choice of one of the following View menu commands: Large Icons, Small Icons, List, and Details. Because these states are mutually exclusive (you can select only one at a time), you need some way of knowing which of the four commands is currently active. That's the job of the option mark: a small dot that appears to the left of the active command (see the Large Icons command in Figure 3.5).

  • A dialog box appears  Dialog boxes are pesky little windows that show up whenever the program needs to ask you for more information. You learn more about them in the "Dealing with Dialog Boxes" section later in this chapter.

Figure 3.5 A few pull-down menu features.

Your Click Is My Command: Toolbar Basics

Pull-down menus are a handy way to access a program's commands and features. A click-click here, a click-click there, and you're off to the digital races. However, it probably won't take very long before you start resenting the few clicks you need to get at the menu commands you use most often. This has certainly happened to the world's programmers, because they keep inventing easier ways to make things happen in a program.

Shortcut Menus

Many Windows programs (and Windows Millennium itself) use shortcut menus to give you quick access to oft-used commands. The idea is that you right-click something and the program pops up a small menu of commands, each of which is somehow related to whatever you right-clicked. If you see the command you want, great: just click it (the left button this time). If you don't want to select a command from the menu, either left-click an empty part of the window or press Esc.

One of their most useful inventions has to be the toolbar. This is a collection of icons designed to give you push-button access to common commands and features. No unsightly key combinations to remember; no pull-down menu forests to get lost in.

Toolbars play a big role in Windows Millennium, and you can reap some big dividends if you get to know how they work. Although most Windows Millennium components have a toolbar or two as standard equipment, let's stick with My Computer. As you can see in Figure 3.6, the toolbar is the horizontal strip located just south of the menu bar. (Your toolbar may look a bit different than this one. I tell you how to make it look this way in just a sec.)

Figure 3.6 Like most Windows Millennium components, My Computer comes with a toolbar.

Most toolbar icons are buttons that represent commands you'd normally access by using the pull-down menus. All you have to do is click a button, and the program runs the command, no questions asked.

Here's a summary of a few other toolbar-related techniques you ought to know:

  • Toolbar text  Most toolbar buttons advertise what they do using nothing more than an icon. Rather than trying to decipher the icon, some toolbars let you display text that at least gives you the name of each button. In My Computer, for example, select View, Toolbars, Customize to display the Customize Toolbar dialog box. Now use the Text options list to select Show text labels, and then click Close.

  • Button banners  If the toolbar doesn't offer text labels, you can still find out the name of a particular button by pointing at it with your mouse. After a second or two, a banner (sometimes called a ToolTip) with the button name pops up.

  • Hiding and showing toolbars  In most programs, you toggle a toolbar on and off by selecting the View, Toolbar command. If a program offers multiple toolbars (as does My Computer), select the View, Toolbars command to display a submenu of the available toolbars, and then select the one you want.

  • Drop-down buttons  You'll occasionally come across toolbar buttons that are really drop-down menu wannabes. In My Computer, the View "button" is an example of the species. As shown in Figure 3.6, you click the downward-pointing arrow to see a list of commands.

Dealing with Dialog Boxes

I mentioned earlier that after you select some menu commands, the program might require more info from you. For example, if you run a Print command, the program might want to know how many copies of the document you want to print.

In these situations, the program sends an emissary to parley with you. These emissaries, called dialog boxes, are one of the most ubiquitous features in the Windows world. This section preps you for your dialog box conversations by showing you how to work with every type of dialog box control you're likely to encounter. (They're called controls because you use them to manipulate the different dialog box settings.) Before starting, it's important to keep in mind that most dialog boxes like to monopolize your attention. When one is on the screen, you usually can't do anything else in the program (such as select a pull-down menu). Deal with the dialog box first, and then you can move on to other things.

Conveniently, the WordPad program offers a wide variety of dialog boxes, so I use it for most of the examples in this section. If you're following along, launch the program by selecting Start, Programs, Accessories, WordPad. Begin by selecting WordPad's View, Options command to have the Options dialog box report for duty, as shown in Figure 3.7.

Figure 3.7 I use WordPad's Options dialog box for the first example.

Okay, let's get started:

  • Command buttons  Clicking one of these buttons executes whatever command is written on the button. The three examples shown in the Options dialog box are the most common. You click OK to close the dialog box and put the settings into effect; you click Cancel to close the dialog box without doing anything; you click Help to open the program's Help system.

  • Check boxes  Windows uses a check box to toggle program features on and off. Clicking the check box either adds a check mark (meaning the feature will get turned on when you click OK) or removes the check mark (meaning the feature will get turned off when you click OK).

  • Option buttons  If a program feature offers three or four possibilities, the dialog box will offer an option button for each state, and only one button can be activated (that is, have a black dot inside its circle) at a time. You activate an option button by clicking it.

  • Tabs  Click any of the tabs displayed across the top of some dialog boxes and you see a new set of controls. (At this point, you no longer need the Options dialog box, so click Cancel to shut it down.)

  • Text boxes  You use these controls to type text data. To see some examples, select WordPad's Format, Paragraph command to get to the Paragraph dialog box, shown in Figure 3.8. The Left, Right, and First line controls are all text boxes. (The Paragraph dialog box has served its purpose, so click Cancel.)

  • List boxes  These controls display a list of items; you select an item by clicking it. An example can be seen if you select WordPad's Insert, Date and Time command, shown in Figure 3.9. (After you've played around a bit, click Cancel to close this dialog box.)

  • Combo boxes  These hybrid controls combine a list box and a text box. You can either select the item you want from the list or type it in the text box. In Figure 3.10, WordPad's Font dialog box shows several examples (select Format, Font to get there).

Figure 3.8 This shows some sample text boxes.

Figure 3.9 As its name implies, a list box presents a list of choices.

Figure 3.10 WordPad's Font dialog box offers several examples of both combo boxes and drop-down list boxes.

  • Drop-down list boxes  These controls represent yet another example of the list box genre. In this case, at first you see only one item. However, if you click the downward-pointing arrow on the right, the full list appears and it becomes much like a regular list box. (That's enough of the Font dialog box, so click Cancel.)

  • Spin boxes  These controls enable you to cycle up or down through a series of numbers. To see an example, select WordPad's File, Print command to wake up the Print dialog box, shown in Figure 3.11. The spin box is named Number of copies. The left part of the spin box is a simple text box into which you can type a number; however, the right part of the spin box has tiny up and down arrow buttons. You click the up arrow to increase the value, and you click the down arrow to decrease the value. (When you're finished, click Cancel to return the Print dialog box whence it came.)

Figure 3.11 Click the spin box arrows to cycle up or down through a range of values.

 

  • + Share This
  • 🔖 Save To Your Account

Related Resources

There are currently no related titles. Please check back later.