Tutorial 11 Five windows included in the Visual Basic Startup Screen Main Form Toolbox Project...

21
Tutorial 1 1 Five windows included in the Visual Basic Startup Screen Main Form Toolbox Project Explorer (Project) Properties

Transcript of Tutorial 11 Five windows included in the Visual Basic Startup Screen Main Form Toolbox Project...

Page 1: Tutorial 11 Five windows included in the Visual Basic Startup Screen Main Form Toolbox Project Explorer (Project) Properties.

Tutorial 1 1

Five windows included in the Visual Basic Startup Screen

Main

Form

Toolbox

Project Explorer (Project)

Properties

Page 2: Tutorial 11 Five windows included in the Visual Basic Startup Screen Main Form Toolbox Project Explorer (Project) Properties.

Tutorial 1 2

Visual Basic startup screen

Page 3: Tutorial 11 Five windows included in the Visual Basic Startup Screen Main Form Toolbox Project Explorer (Project) Properties.

Tutorial 1 3

Project and Properties Windows

Page 4: Tutorial 11 Five windows included in the Visual Basic Startup Screen Main Form Toolbox Project Explorer (Project) Properties.

Tutorial 1 4

Caption vs Name Property

Caption property

Controls the text seen by the user

Name property

Assigns a name to an object

Used by the programmer to refer to an object in code

Page 5: Tutorial 11 Five windows included in the Visual Basic Startup Screen Main Form Toolbox Project Explorer (Project) Properties.

Tutorial 1 5

Name Property

Must begin with a letter

Can contain letters, numbers, and the underscore character only

Must not contain punctuation characters or spaces

Must not exceed 40 characters

Use the three-character IDs shown in Figure 1-10

Page 6: Tutorial 11 Five windows included in the Visual Basic Startup Screen Main Form Toolbox Project Explorer (Project) Properties.

Tutorial 1 6

Saving a Project

Click the Save Project button on the Standard toolbar. Provide a name for the form and the project

You also can use the Save <filename> As and Save Project As commands on the File menu. However, be sure to save the form before saving the project

Page 7: Tutorial 11 Five windows included in the Visual Basic Startup Screen Main Form Toolbox Project Explorer (Project) Properties.

Tutorial 1 7

Starting and Ending a Project

To start a project: Click the Start button on the Standard toolbar. You also can press F5 or use the Start command on the Run menu

To end a project: Click the End button on the Standard toolbar. You also can use the End command on the Run menu

Page 8: Tutorial 11 Five windows included in the Visual Basic Startup Screen Main Form Toolbox Project Explorer (Project) Properties.

Tutorial 1 8

Opening a Project

To open a new project, use the File menu’s New Project command

To open an existing project, click the Open Project button on the Standard toolbar. You also can use the Open Project command on the File menu, or the Ctrl+O key combination

Page 9: Tutorial 11 Five windows included in the Visual Basic Startup Screen Main Form Toolbox Project Explorer (Project) Properties.

Tutorial 1 9

Getting Help

Use the Help menu’s Contents, Index, or Search commands

Click the object, window, property, and so on for which you want help, then press the F1 key

Page 10: Tutorial 11 Five windows included in the Visual Basic Startup Screen Main Form Toolbox Project Explorer (Project) Properties.

Tutorial 1 10

MSDN Library Visual Studio 6.0

Page 11: Tutorial 11 Five windows included in the Visual Basic Startup Screen Main Form Toolbox Project Explorer (Project) Properties.

Tutorial 1 11

Caption Property’s Help Screen

Page 12: Tutorial 11 Five windows included in the Visual Basic Startup Screen Main Form Toolbox Project Explorer (Project) Properties.

Tutorial 1 12

Default-size label control added to the form

Page 13: Tutorial 11 Five windows included in the Visual Basic Startup Screen Main Form Toolbox Project Explorer (Project) Properties.

Tutorial 1 13

Classes and Objects

Each tool in the toolbox represents a

class, which is a pattern from which one

or more objects, called controls, are

created

Each control you create is an instance of

the class from which it was created

Page 14: Tutorial 11 Five windows included in the Visual Basic Startup Screen Main Form Toolbox Project Explorer (Project) Properties.

Tutorial 1 14

Sizing, Moving, and Deleting Controls

You can size, move, and delete a

control, as well as set its properties

Before you can delete a control, the control

must be selected and the form must be the

active window

Page 15: Tutorial 11 Five windows included in the Visual Basic Startup Screen Main Form Toolbox Project Explorer (Project) Properties.

Tutorial 1 15

Selecting More Than One Control

You can change a property for more than one control at a time

Click the first control you want to select, then Ctrl-Click the remaining controls

Use the mouse pointer selection method

Page 16: Tutorial 11 Five windows included in the Visual Basic Startup Screen Main Form Toolbox Project Explorer (Project) Properties.

Tutorial 1 16

Open Code Window

Page 17: Tutorial 11 Five windows included in the Visual Basic Startup Screen Main Form Toolbox Project Explorer (Project) Properties.

Tutorial 1 17

Listing of Properties and Methods

Page 18: Tutorial 11 Five windows included in the Visual Basic Startup Screen Main Form Toolbox Project Explorer (Project) Properties.

Tutorial 1 18

Editor Tab in the Options Dialog Box

Page 19: Tutorial 11 Five windows included in the Visual Basic Startup Screen Main Form Toolbox Project Explorer (Project) Properties.

Tutorial 1 19

Printing an Application

Page 20: Tutorial 11 Five windows included in the Visual Basic Startup Screen Main Form Toolbox Project Explorer (Project) Properties.

Tutorial 1 20

Making an Executable File

Visual Basic’s compiler translates the

application’s code into machine code

The machine code is stored in a file with

a .exe extension on its name

Page 21: Tutorial 11 Five windows included in the Visual Basic Startup Screen Main Form Toolbox Project Explorer (Project) Properties.

Tutorial 1 21

Debugging Technique

Print the application’s properties (Form As Text) and code

In the properties printout, look for a property that is not set correctly

In the code printout, look for an instruction that is either in the wrong object’s Code window or in the wrong event procedure