Visual Basic Programming With Mr. deVries. Programming A series of instructions that are used to...

8
Visual Basic Programming With Mr. deVries

Transcript of Visual Basic Programming With Mr. deVries. Programming A series of instructions that are used to...

Page 1: Visual Basic Programming With Mr. deVries. Programming A series of instructions that are used to solve a problem Programmers must be open to seeing the.

Visual Basic Programming

With Mr. deVries

Page 2: Visual Basic Programming With Mr. deVries. Programming A series of instructions that are used to solve a problem Programmers must be open to seeing the.

Programming

• A series of instructions that are used to solve a problem

• Programmers must be open to seeing the world through many perspectives

• “An open mind: It’s a good thing”

~Martha Stewart

Page 3: Visual Basic Programming With Mr. deVries. Programming A series of instructions that are used to solve a problem Programmers must be open to seeing the.

Object Oriented Programming

• Deals with data in terms of objects, each object with its own features, properties, and functions

• Opposite of OOP is Procedural programming, which is more simple on a small scale, but impossible to organize on a large scale!

Page 4: Visual Basic Programming With Mr. deVries. Programming A series of instructions that are used to solve a problem Programmers must be open to seeing the.

Starting off with VB – some basic objects

• What is a form?– A container for objects

• What is a button?– An object that you click on

• What is a label?– An object that contains text

Page 5: Visual Basic Programming With Mr. deVries. Programming A series of instructions that are used to solve a problem Programmers must be open to seeing the.

Properties of Objects• Every object, whether a real one or an

information one, has properties about it• Some properties of a basketball: size,

colour, indoor or outdoor, bounciness.• Some properties in VB:

– Caption– Name– Visibility– Font

Page 6: Visual Basic Programming With Mr. deVries. Programming A series of instructions that are used to solve a problem Programmers must be open to seeing the.

Properties of Objects

• These are examples of some other objects in VB:– List boxes– Menus– Graphics– Timers– Combo Boxes– Radio buttons

Page 7: Visual Basic Programming With Mr. deVries. Programming A series of instructions that are used to solve a problem Programmers must be open to seeing the.

Properties of Objects

• The properties of objects can be set by you, and even changed by the program

• imgSweetPic.Visible = False

• This will make the picture called imgSweetPic invisible

• Use the “dot notation” to set properties:– nameOfObject . property = value

Page 8: Visual Basic Programming With Mr. deVries. Programming A series of instructions that are used to solve a problem Programmers must be open to seeing the.

Hello World Application

• Create a program that will display your greetings to any user that uses your program– Follow instructions in Review 2, pg 3-6 to 3-7

• Read sections 3.9 to 3.16, doing reviews along the way. (Reviews 3,4,5 an 6)