september 16, 2009
DESCRIPTION
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: - PowerPoint PPT PresentationTRANSCRIPT
Visual Basic Sophomore Class
Today’s Agenda:*Review of VB Screen*Look at forms and
PropertiesHomework: Study for test on Friday.
September 16, 2009
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.
Why 9/9/09?
The Visual Basic compiler starts with what?What is the name of this box?
Can you name the different parts of the screen?
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.
Introduction to Microsoft Visual Basic
To run a Visual Basic Program, click the Start button from the standard toolbar.
Or choose Run from the Menu bar.
Running a Visual Basic Program
Click the Standard EXE on the New Project dialog box and then click the open button.
How to create a new project?
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.
Forms!
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!
Saving the Project
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:
CaptionName
Viewing and Modifying Properties
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!
Caption 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!
Name Property
PrefixType of Object Examplecmd Command Button cmdExitfrm Form
frmCalculatorimg Image imgAmylbl Label
lblPrompttxt Text txtHeight
Rules to name your ob ject:
Study for test on Friday. Don’t forget to pick up your worksheet of
questions!
Homework: