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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

400 <strong>Computer</strong> <strong>Programming</strong> <strong>Concepts</strong> <strong>and</strong> <strong>Visual</strong> <strong>Basic</strong><br />

1. Click the Start button on the Windows taskbar, point to Programs, point to<br />

Microsoft ActiveX Control Pad, <strong>and</strong> then click on Microsoft ActiveX Control<br />

Pad in the final pop-up list. The window that appears (see Figure 13-6) contains<br />

a template for an HTML document.<br />

FIGURE 13-6 ActiveX Control Pad<br />

2. In the Title element, replace “New Page” with “My First Web Page”.<br />

3. Just below the begin Body tag, type the following lines.<br />

Hello<br />

Type your first name into the box.<br />

4. Press Alt/Edit/Insert ActiveX Control. (An Insert ActiveX dialog box appears<br />

containing a list of all available controls.)<br />

5. Scroll down the list <strong>and</strong> double-click on Microsoft Forms 2.0 TextBox. (Two<br />

windows appear. One window, titled Edit ActiveX Control, contains a text box<br />

<strong>and</strong> is similar to a <strong>Visual</strong> <strong>Basic</strong> form. The other window is an abbreviated text<br />

box Properties window.)<br />

6. Scroll down the Properties window <strong>and</strong> click on ID. (The default setting<br />

TextBox1 appears next to ID <strong>and</strong> in the settings text box at the top of the Properties<br />

window. The ID property is the same as <strong>Visual</strong> <strong>Basic</strong>'s Name property.)<br />

7. Replace the words in the settings text box with txtFirstName <strong>and</strong> click on the<br />

Apply button.<br />

8. Go to the Edit ActiveX Control window <strong>and</strong> make the text box a little larger.<br />

9. Close the windows by clicking on their X buttons. (An OBJECT element for the<br />

text box has been added to the ActiveX Control Pad.)<br />

10. Type .<br />

11. Repeat Steps 4 through 9 to add a comm<strong>and</strong> button OBJECT element. (Select<br />

Microsoft Forms 2.0 Comm<strong>and</strong> button, give it the ID cmdShow, <strong>and</strong> the caption<br />

“Show Greeting.”)<br />

12. Press Alt/File/Save As, select a location <strong>and</strong> name (with extension htm) for the<br />

file, <strong>and</strong> click on the Save button.<br />

13. Invoke Internet Explorer. (There is no need to actually connect to the internet<br />

via a phone line.)<br />

14. Type the filespec for your saved HTML page into the address box <strong>and</strong> press<br />

Enter. (The window in Figure 13-7 will appear.)

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

Saved successfully!

Ooh no, something went wrong!