19.12.2012 Views

Computer Programming Concepts and Visual Basic David I. Schneider

Computer Programming Concepts and Visual Basic David I. Schneider

Computer Programming Concepts and Visual Basic David I. Schneider

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

2. Double-click on the picture box icon to place a picture box in the center of the<br />

form. (The picture box icon is the second icon in the Toolbox. It contains a picture<br />

of the sun shining over a desert.)<br />

3. Enlarge the picture box.<br />

4. Run the program. Nothing happens <strong>and</strong> nothing will, no matter what you do.<br />

Although picture boxes look like text boxes, you can’t type in them. However,<br />

you can display text in them with statements discussed later in this section, you<br />

can draw lines <strong>and</strong> circles in them with statements discussed in Section 9, <strong>and</strong><br />

you can insert pictures into them.<br />

5. End the program <strong>and</strong> click the picture box to select it.<br />

6. Activate the Properties window, <strong>and</strong> double-click on the Picture property. A<br />

Load Picture dialog box appears. See Figure 2-11.<br />

FIGURE 2-11 The Load Picture Dialog Box<br />

7. Select the Windows folder <strong>and</strong> then double-click on one of the picture files.<br />

Good c<strong>and</strong>idates are Clouds.bmp, shown in Figure 2-12, <strong>and</strong> Setup.bmp. (Also,<br />

the CD accompanying this textbook contains several picture files in the folder<br />

Pictures.)<br />

FIGURE 2-12 A Picture Box Filled with the Clouds.bmp Picture<br />

8. Click on the picture box <strong>and</strong> press Del to remove the picture box.<br />

<strong>Visual</strong> <strong>Basic</strong> Objects 25

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!