18.01.2013 Views

Tutorial: Programming in Visual Basic 6.0

Tutorial: Programming in Visual Basic 6.0

Tutorial: Programming in Visual Basic 6.0

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.

Quit<br />

with <strong>in</strong>dented subhead<strong>in</strong>gs of<br />

Introduction<br />

Example1<br />

Example2<br />

Click OK after each menu caption and name are typed.<br />

• Click on Quit menu head<strong>in</strong>g and enter the follow<strong>in</strong>g code. This procedure is used to<br />

from runn<strong>in</strong>g the project display and return to the design screens.<br />

exit<br />

Private Sub Quit_Click()<br />

End Sub<br />

Unload me<br />

End<br />

• Use the function key to run the application to verify that the Menu structure is<br />

and that the Quit procedure is free from error.<br />

correct<br />

Use the File menu to save your work as Ma<strong>in</strong>.frm and (your <strong>in</strong>titials)Project1.vbp<br />

•<br />

Use the file menu to open a new blank form (or the properties w<strong>in</strong>dow)<br />

•<br />

Set the follow<strong>in</strong>g form properties:<br />

•<br />

form name as Welcome<br />

caption to Example1<br />

BackColor to White<br />

BorderStyle to Fixed S<strong>in</strong>gle<br />

W<strong>in</strong>dowState to Maximised<br />

• Click on the Example 1 ma<strong>in</strong> menu head<strong>in</strong>g and enter the follow<strong>in</strong>g code:<br />

Private Sub Example1_Click()<br />

Welcome.Show<br />

End Sub<br />

• Save your work and run to ensure that it is free of errors.<br />

• Add two labels, an image and a command button to create a welcome screen. To do<br />

this

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

Saved successfully!

Ooh no, something went wrong!