csi 101 elements of computing

17
CSI 101 Elements of Computing Spring 2009 Lecture #12 – Using Visual Basic Developer Studio Monday, March 23 rd

Upload: jess

Post on 14-Jan-2016

44 views

Category:

Documents


0 download

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 Presentation

TRANSCRIPT

Page 1: CSI 101 Elements of Computing

CSI 101Elements of ComputingSpring 2009Lecture #12 – Using Visual Basic Developer StudioMonday, March 23rd

Page 2: CSI 101 Elements of Computing

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

Page 3: CSI 101 Elements of Computing

3

Opening Screen

Page 4: CSI 101 Elements of Computing

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

Page 5: CSI 101 Elements of Computing

5

PropertiesWindow

ProjectWindow

Page 6: CSI 101 Elements of Computing

6

Page 7: CSI 101 Elements of Computing

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

Page 8: CSI 101 Elements of Computing

8

File options

Page 9: CSI 101 Elements of Computing

View options

9

Page 10: CSI 101 Elements of Computing

10

Debug options

Page 11: CSI 101 Elements of Computing

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

Page 12: CSI 101 Elements of Computing

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

Page 13: CSI 101 Elements of Computing

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

Page 14: CSI 101 Elements of Computing

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

Page 15: CSI 101 Elements of Computing

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

Page 16: CSI 101 Elements of Computing

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

Page 17: CSI 101 Elements of Computing

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