Return to IFS 110 class Notes Menu!

Project 1
Building an Application

What is Visual Basic?

 Active Window
3 Windows in Visual Basic

Click to Enlarge Window

  1. Form Window - user interface
  2. Project Window - codes for forms and modules
  3. Properties Window - properties of objects on the form (defaults)

 Setting Development Environment Options

Types of Interfaces

Note: Interface chosen is a personal preference

Types of Interfaces

Problem in Lab : IDE may look completely different every time student comes to lab and starts Visual Basic

Arranging Toolbars and Windows

Design and Run Time

Note: form becomes the window the application occupies on desktop

Form Properties

Adding and Removing Controls

Note: 20 intrinsic controls are in the Toolbox of Visual Basic’s standard edition.

 3 Types of Controls
(Project One)

Removing Controls

  1. Point to Control
  2. Click left mouse button
  3. Press DELETE key

Setting Properties

2 Sections of Properties Window

Property Examples

Note: can be changed during run-time

Property Examples

Naming Controls

Event Procedures

Note: events can be the execution of code statements at run-time

Event Procedures

 Functions and Methods

Note: Visual Basic has many predefined functions and methods that you can use in your code

Writing Code

Note: Each block has a header and terminal statement to show where subroutine begins and ends

Note: These first and last statements are supplied by Visual Basic when you begin a new event subroutine.

Subroutine Format

Sub Command1_Click ( )

‘Display Commission Amount as val of UserInput * Rate

Text2.text = Val(Text1.text) * 0.15

Text1.SetFocus

End Sub

Note: Text in Blue supplied by Visual Basic

Coding Environment

Note: If statement can’t be converted error message displayed

Saving a Project

Documenting an Application

3 Parts of Print Dialog Box

  1. Form Image - prints blank form at design-time
  2. Code - prints code for module or entire project
  3. Form As Text - prints a list of all controls and property settings that are different from their default settings
Note: must first select current module (form) or the entire project before selecting parts to print

Project 1
Building an Application
END

Program Maturity Calculator Requirements

Return to IFS 110 class Notes Menu!

Click for Printer Version