View
223
Download
0
Category
Tags:
Preview:
Citation preview
Visual Basic Slide 2 of 10
IDE
Topic & Structure of the lesson
•Introduction
•Integrated Development Environment
•Tool Box
•Properties Window
•Form Window
•Saving a Project
Visual Basic Slide 3 of 10
IDE
Learning Outcomes
At the end of this lesson you should be able to :
1. Know the Integrated Development Environment
2. Use the Project window
3. Use the Visual Basic Toolbox
4. Use Form Layout Window
5. Use the Properties Window
6. Save a Visual Basic Project
Visual Basic Slide 4 of 10
IDE
Keywords
If you have mastered this topic, you should be able to use the following terms correctly in your assignments and exams:
IDE Toolbox Text Box Label Command Button Form Window Properties
Visual Basic Slide 5 of 10
IDE
VB IDE is used to Create, Run and Debug Visual Basic programs in one application without the need to open additional programs.
Integrated Development Environment
Visual Basic Slide 6 of 10
IDE
Starting Visual Basic 6.0
• Select Microsoft Visual Studio
• Select Visual Basic 6.0
• Click Standard.EXE to start programming
Visual Basic Slide 7 of 10
IDE
Viewer buttons that can show the interface elements or the programming.
List of Forms.
Other files - modules
The Project Window
Visual Basic Slide 8 of 10
IDE
Picture BoxText Input BoxCommand ButtonRadio ButtonList BoxVertical Scroll BarDrive List BoxFile List BoxLineData Control
Selection arrowText Label
FrameCheck Box
Combo BoxHorizontal Scroll Bar
TimerDirectory List Box
ShapeImage
Visual Basic Toolbox
Visual Basic Slide 9 of 10
IDE
Group ExerciseMatch as many controls on the toolbar :
a)Command Button
b)Option Button
c)Label
d)Line
e)Frame
f)Image
g)Picture Box
h)VScrollBar
i)Text Box
j)Timer
k)Check Box
l)Radio Buttons
Visual Basic Slide 10 of 10
IDE
Option buttons are used in a groups where only one can be true.
OptionButton
Provide the user with a toggle choice (checked or unchecked).
Check Box
Represent a button.CommandButton
A control for grouping other control.Frame
Accepting the user input and can display text also.
TextBox
Displays uneditable text to the user.Label
Displays Image.PictureBox
DescriptionControl
Visual Basic Toolbox
Visual Basic Slide 11 of 10
IDE
A control for accessing directories.DirListBox
A control for accessing the system disk drives (C : A : etc.).
DriveListBox
A control that performs a task at programmer-specified intervals. A
Timer is not visible to the user.
Timer
A vertical scrollbar.VScrollBar
A horizontal scrollbar.HScrollBar
Provides a short list of items.ComboBox
Provides a long list of items.ListBox
DescriptionControl
Visual Basic Toolbox
Visual Basic Slide 12 of 10
IDE
Exercise
Describe the purpose of the following controls :1. Text Box2. Label3. Command Button4. Check Box5. Option Buttons6. Frame7. Picture Box
Visual Basic Slide 13 of 10
IDEForm layout windows specifies a form’s
position on a screen at runtime. The Form Layout window consists of an image
representing the screen and the form’s relative position on the screen.
Form Layout
Screen
Form
Visual Basic Slide 14 of 10
IDE
•The properties window displays the properties for a form or control. Properties are attributes such as size, position, color,etc.
Properties Window
Visual Basic Slide 15 of 10
IDE
Name Of Control or Form
Type Of Control or Form
Scroll Bar
Selected Property Description
Properties Window
Visual Basic Slide 16 of 10
IDE
Exercise
• List FIVE other properties that you can think of for an object.
• Why are they needed ?
Visual Basic Slide 17 of 10
IDE
File and Project Tools
Menu Bar and Tool Bar
Run and Debug Buttons
Size and position infoThe menu bar
Visual Basic Slide 18 of 10
IDE
Executing a program, stopping a program, etc.Run
Options for debugging.Debug
Aligning and locking a Form’s control.Format
Adding features e.g forms to the project.Project
Displaying IDE windows and tool bars.View
Cut, paste, find, undo, delete, etc.Edit
Used for opening, closing, and printing projects, etc.
File
DescriptionMenu
Menu Bar and Tool Bar
Visual Basic Slide 20 of 10
IDE
Save a Form and Project
• Ensure that the Form is saved first before saving the project.
Rules
• Click File Menu
• Save Form1 as …. then
• Save Project as ……..
Visual Basic Slide 21 of 10
IDE
Group Exercise
True/False1. The toolbar contains the control items2. The Project window is also called the Project Explorer3. The tool bar provides an easy way to run certain menu
commands4. VB is an integrated development environment5. Caption is used to display a name for an object6. A text box can only be used to display items7. A command button is used to execute a program8. A form is used to place components for design purpose9. VB is used to create web or internet applications
Visual Basic Slide 22 of 10
IDE
Home Work
• Design an interface and place your Name, Intake and Institute Name on three separate labels.
• Place three text boxes on the form• Place a command button to display your name,
intake and institute’s name on the text boxes.• Place Apiit Logo on the form using a Picture
Box.• Save your VB Project in A:\VB\exercise1.vbp
Recommended