170 likes | 268 Views
Visual Basic Sophomore Class Today’s Agenda: *Review of VB Screen *Look at forms and Properties H omework: Study for test on Friday. September 16, 2009. Why 9/9/09?. Extra Credit Assignment was to list 5 reasons. Here are some reasons:
E N D
Visual Basic Sophomore ClassToday’s Agenda: *Review of VB Screen*Look at forms and Properties Homework: Study for test on Friday. September 16, 2009
Why 9/9/09? Extra Credit Assignment was to list 5 reasons. Here are some reasons: • The number 9 is special and can carry good or bad omens. • In Florida, a one-day wedding special for $99.99. • iPod has moved their traditional Tuesday release day to Wednesday. • New film will be opening – ‘9’ (an animated tale about the apocalypse. • Number looks good for Marketing promotions. • Represents the last set or repeating, singel-digit dates that we will see for a century (until 1/1/2101 or 1/1/3001) • The number 9 is associated with forgiveness, compassion and success on the positive side as well as arrogance and self-righteousness on the negative side. • The sum of the two-digits resulting from 9 multiplied by any other single-digit number will equal 9. • Multiply nine by any two, three or four digit number and the sum of those will also break down to 9. • Is the 252 day of the year. • The Chinese believe that the number 9 is associated with a long life. • The Japanese believe the number 9 is highly unlucky - second only to four, which sounds like death.
The Visual Basic compiler starts with what?What is the name of this box?
Introduction to Microsoft Visual Basic • Microsoft Visual Basic is a software tool that allows you to create programs. • Visual Basic can be started from a shortcut on the desktop or from the Start button and programs. • Visual Basic stores programs in a group of files called a project. • Has a file extenion of VBP • Project Explorer allows you to see the forms and files that make up your program.
Introduction to Microsoft Visual Basic • There is a toolbox with tools that allows you to draw command buttons, scroll bars, and much more.
Introduction to Microsoft Visual Basic • The pieces that make up a Visual Basic program are called objects. • The characteristics are called properties. • The properties of an object can be changed from the Properties Window.
Introduction to Microsoft Visual Basic • The Form Layout window shows the position the form will take when the programs run.
Running a Visual Basic Program • To run a Visual Basic Program, click the Start button from the standard toolbar. • Or choose Run from the Menu bar.
How to create a new project? • Click the Standard EXE on the New Project dialog box and then click the open button.
Forms! • Each project that you create will have one default form. You can add as many forms as needed for the project. • In VB, forms become the windows and dialog boxes when the program runs.
Saving the Project • When saving the project, you actually save the forms of the project and then the project itself. • Remember - you must save your forms along with your project or you cannot open your program later!
Viewing and Modifying Properties • Remember – the characteristics of Visual Basic objects are called properties. • The properties window allows you to easily alter the properties of objects. • Two most important properties of a form are: • Caption • Name
Caption Property • Caption • Allows you to specify the text that appears in the title bar of the form. • Allows you to specify the text that appears in a button. • Allows you to specify the text that appears in a label. • Plus much more!
Name Property • Name • Each object has a name. • The name of the object becomes very important when you begin writing VB code to manipulate the objects. • When naming objects, you should use names that are meaningful and describe the object you are naming. • Use a prefix to your name!
Rules to name your ob ject: Prefix Type of Object Example cmd Command Button cmdExit frm Form frmCalculator img Image imgAmy lbl Label lblPrompt txt Text txtHeight
Homework: • Study for test on Friday. • Don’t forget to pick up your worksheet of questions!