Upload
bruno-edwards
View
212
Download
0
Tags:
Embed Size (px)
Citation preview
11
Lab1Lab1
Ismail M. Romi – IT Dept , PPU, 2010
22
Visual Basic 2005Visual Basic 2005
Programming TourProgramming Tour
3
Structure of a VB Application (Project)1. Project: A collection of files.
2. Solution: a collection of projects
3. Forms: Windows that you create for user interface.
4. Controls: Objects drawn on the form to allow user interaction.
5. Properties: Characteristics of forms and objects.
3
4
Structure of a VB Application (Project)… Cont.
5. Methods: Built-in procedures
6. Event Procedures: Code related to objects.
7. General Procedures: Code not related to objects.
4
5
Start Page
Open existing project
Create new
project
6
New Project Dialog Box
New Project Dialog Box
Project Name
Select windows
Application
77
IntegratedIntegrated Development Development EnvironmentEnvironment
IIDDEE
88
VB 2005 Integrated Development Environment (IDE)
99
The Title Bar
The line at the top of the window which shows:
1. The project name.
2. The project status (Design, Run).
1010
The Menu Bar
Note: Each menu item has it’s own pull down menu which contains another menu items.
Menu Item
1111
The Tool Bar
•Contains buttons that performs specific tasks.
•To Show/Hide Tool Bar: View, Toolbars
1212
The Tool Box
Copyright 2008: Ismail M.Romi, PPU. All Rights Reserved
A collection of buttons called Controls that enables you to implement the graphical user interface.
1313
The Form Window
The background window that the user see during the program execution.
The forms are given a default name Form1, From2…
On the form you can place the controls from the toolbox required for the user interface.
Title Bar
1414
The Solution Explorer
•A window that lists all solution projects, files
•You can use the context window to Add, Save, Remove file.
1515
The Properties Window
Property Name
Property Value
Toggle to events
Toggle to properties
Control Name
1616
The Properties Window Lists the properties and events of the
controls (objects). Each control and form has it’s own
properties and events. Each property consists of :
Name. Value.
You can change the values in the properties window, and this is reflected automatically on the associated Control (Object).
1717
Placing Controls on the Form
Ways:
1- Double-click the control you want from the ToolBox.
2- Choose the Control from the ToolBox, assign it’s place on the from.
1818
Lab1 Training
Part I: Examples
1- Design a VB project, to perform Greetings.
2- Saving the project.
1919
Lab1 TrainingPart II: Questions
Question I Start VB. Close the Form, Project, Properties, and
Toolbox windows. Now perform the actions necessary to
make each window appear on-screen.
2020
Lab1 Training
Question II Start a new project in VB 2005. Delete any custom controls from the project. Add three text boxes and two command buttons. Change the text property of each button, Use whatever text
you want Change the Text property of the text boxes so that they are
blank (Empty).
2121
Lab1 Training
Design the greeting interface as follow:
When you click University Greeting, the message “Welcome to PPU University” will appear in the textbox.
When you click College Greeting, the message “Welcome to Adm. College” will appear in the textbox.
When you click End the program ends.
Question III
2222
Lab1 Lab1 EndEndThank you