csi 101 elements of computing
DESCRIPTION
CSI 101 Elements of Computing. Spring 2009 Lecture #12 – Using Visual Basic Developer Studio Monday, March 23 rd. Visual Studio. Development environment for Visual Basic Makes creation of VB applications easier Provides toolbars to assist developer Packages application in desired form - PowerPoint PPT PresentationTRANSCRIPT
CSI 101Elements of ComputingSpring 2009Lecture #12 – Using Visual Basic Developer StudioMonday, March 23rd
2
Visual Studio
Development environment for Visual Basic Makes creation of VB applications easier Provides toolbars to assist developer Packages application in desired form
ExecutableDLL
3
Opening Screen
4
Development Area Workarea Can see forms, code, and available toolbars Project Window
Shows all forms in Project/Application Properties Window
Shows properties of current objectCurrent object is the one highlighted in the
workarea
5
PropertiesWindow
ProjectWindow
6
7
Menu Bar File: saving the Project’s data Edit View : change open Windows Project : Add items to Project Build : Compile your Project Debug : Test your application Ignore the others for now
8
File options
View options
9
10
Debug options
11
Adding objects to Form
Click on icon in toolbox Click on one corner where you want it Holding down mouse button, roll mouse to
ending pointObject will automatically be added It becomes current object, with Properties
window updating
12
Form Properties (Name) : Name of form as seen in Project
window Back Color : background color Caption : Title as appears on Title bar Icon : Picture that appears on Windows
application bar
13
Text Box Properties
(Name) : Name of object as referenced in code
Alignment : Text aligns with what?Left – begins to left of boxRight – stops at right edgeCenter – Centered in box
Font : Font style Fore Color : Font color
14
Text Box Properties, cont Locked : Can user change value in box? Visible : Seen on screen
This property can be changed in procedure code
Often changed to “suddenly” make a text box apper
15
Command Button Properties
(Name) Caption : Text that appears on button Enabled : Button can be clicked
Often changed to make a button available only with certain text values
16
Object Event Code
Open Code window by double clicking on an object in the Work area
If no code previously, will create event procedure for most common eventForm_LoadCommandButton_ClickTextBox_Change
17
Common Events
Command ButtonClick : Occurs when button is “clicked”
Text BoxChange : Value is changed or addedGotFocus : cursor arrives in text boxLostFocus : cursor leaves text box