september 16, 2009

17
Visual Basic Sophomore Class Today’s Agenda: *Review of VB Screen *Look at forms and Properties Homework: Study for test on Friday. September 16, 2009

Upload: heinz

Post on 14-Jan-2016

24 views

Category:

Documents


0 download

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 Presentation

TRANSCRIPT

Page 1: September 16, 2009

Visual Basic Sophomore Class

Today’s Agenda:*Review of VB Screen*Look at forms and

PropertiesHomework: Study for test on Friday.

September 16, 2009

Page 2: 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?

Page 3: September 16, 2009

The Visual Basic compiler starts with what?What is the name of this box?

Page 4: September 16, 2009

Can you name the different parts of the screen?

Page 5: September 16, 2009

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

Page 6: September 16, 2009

There is a toolbox with tools that allows you to draw command buttons, scroll bars, and much more.

Introduction to Microsoft Visual Basic

Page 7: September 16, 2009

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

Page 8: September 16, 2009

The Form Layout window shows the position the form will take when the programs run.

Introduction to Microsoft Visual Basic

Page 9: September 16, 2009

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

Page 10: September 16, 2009

Click the Standard EXE on the New Project dialog box and then click the open button.

How to create a new project?

Page 11: September 16, 2009

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!

Page 12: September 16, 2009

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

Page 13: September 16, 2009

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

Page 14: September 16, 2009

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

Page 15: September 16, 2009

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

Page 16: September 16, 2009

PrefixType of Object Examplecmd Command Button cmdExitfrm Form

frmCalculatorimg Image imgAmylbl Label

lblPrompttxt Text txtHeight

Rules to name your ob ject:

Page 17: September 16, 2009

Study for test on Friday. Don’t forget to pick up your worksheet of

questions!

Homework: