Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 3 Introducing Visual Basic

Similar presentations


Presentation on theme: "Chapter 3 Introducing Visual Basic"— Presentation transcript:

1 Chapter 3 Introducing Visual Basic
3.1 to 3.8

2 3.1 to 3.8 3.1 The Visual Basic Programming Language
3.2 A Visual Basic Application 3.3 The Visual Basic IDE 3.4 Adding Objects to a Form 3.5 Object Property Values 3.6 Resizing and Moving an Object 3.7 Saving a Project 3.8 Running a Visual Basic Application

3 3.1 The Visual Basic Programming Language
Based on BASIC which was created in 1960’s by John Kemeny and Thomas Kurtz at Dartmouth University. BASIC – Beginner’s All-Purpose Symbolic Instruction Code

4 John Kemeny born: May 31, 1926 in Budapest, Hungry died: December 26, 1992 in Hanover, New Hampshire Co-inventor of BASIC. Einstein's mathematical assistant. Leader and innovator in mathematics education. President of Dartmouth College.

5 Thomas Kurtz BASIC was invented at Dartmouth College in 1964 to give students a simple programming language that was easy-to-learn. It turned out that easy-to-learn and use was also a good idea for faculty members, staff members, and everyone else. There were very few choices for students, teachers, and others who didn't want to dedicate their lives to programming. Our programming language provided the solution and has played an important role in the field ever since. Even with all the new languages introduced since then, BASIC use continues to grow

6 Bill Gates 1975 Bill Gates and Paul Allen developed a version of BASIC. Founder of Microsoft QuickBasic created by Microsoft. Microsoft combined Rudy and Basic to get Visual Basic.

7 OOP Object Oriented Programming
Uses classes, which are program code and data, to create objects. Objects- can have visual representation such as a dialog box, button etc. Event-driven program – when a program runs due to an object being selected by the user.

8 3.2 A Visual Basic Application
Application – another name for a program. Interface – is what appears on the screen when the application is running. Program Code – is instructions that tells an application’s objects how to behave.

9 3.3 The Visual Basic IDE IDE – Integrated development environment.
Used to create a Visual Basic application The Visual Basic IDE consists of: Menu Bar Tool Bar Tool Box Project Window Project Explorer Window Properties Window Form Layout Window

10 The Visual Basic IDE

11 Visual Basic Environment
Menu Bar Tool Bar Project Window Project Explorer Window Properties Window Form Layout Window

12 3.4 Adding Objects to a Form
Form – is a container object for other objects

13 Design Time Objects are added during design time
The time during which the applications interface is being created. Label object is used to display information. Command Button object is something a user can click on. Objects are added by clicking and moving your mouse over to the screen and dragging it across the form.

14 3.5 Object Property Values
Properties – defines its appearance, behavior, position, and other attributes. Each type of objects have many different types of properties.

15 Label Properties Name – identifies an object all names should start with the prefix “lbl”. Caption – changes the text displayed in the label Font – used to change font style, and size. Alignment – Changes the alignment of text in a label’s caption (left & right justify and center)

16 Command Button Properties
Name – identifies the object. Prefix “cmd” Caption – Changes the text displayed in the command button.

17 Form Properties Name – identifies an object. Prefix “frm”
Caption – changes the text displayed in the title bar.

18 Programming Style When naming an object, it should start with the appropriate prefix and then be descriptive of the object’s purpose.

19 3.6 Resizing and Moving Objects
Selecting an object is done by simply clicking on it. Resizing by using the drag handle Marquee Selection – Selecting the pointer control and create a dash box around several objects at one time.

20 3.7 Saving a Project File menu and select the “Save Project” command or clicking on disk icon shortcut key. First saved – both form and project must be given descriptive names. Save the form using the same name as its Name Property and then save the project using a descriptive name of the application.

21 3.8 Running a Visual Basic Application
F5 – start command Run Menu and select run Run icon on the toolbar

22 Run Time Refers to the time during which application is being executed. A VB program can be run at any time of its development.

23 End Command Run Menu – select “End” command.
Click the End icon on the Tool Bar.


Download ppt "Chapter 3 Introducing Visual Basic"

Similar presentations


Ads by Google