The Program Editor1 Visual Basic (VB) supports a text editor (not a word processor) that permits the...

9
The Program Editor 1 The Program Editor Visual Basic (VB) supports a text editor (not a word processor) that permits the writing and modification of program code. The editor is one of two sub-windows that appears in the Workspace. The other is the Forms window. Many of the commands used in the editor are like those used in word processors, but there are differences.

description

The Program Editor3 Line Completion Help (1) When a line is being entered, the editor will make suggestions. When changing the caption on the button “cmdthingie” the editor presents suggestions when you add the “dot”.

Transcript of The Program Editor1 Visual Basic (VB) supports a text editor (not a word processor) that permits the...

Page 1: The Program Editor1 Visual Basic (VB) supports a text editor (not a word processor) that permits the writing and modification of program code. The editor.

The Program Editor 1

The Program Editor

• Visual Basic (VB) supports a text editor (not a word processor) that permits the writing and modification of program code.

• The editor is one of two sub-windows that appears in the Workspace. The other is the Forms window.

• Many of the commands used in the editor are like those used in word processors, but there are differences.

Page 2: The Program Editor1 Visual Basic (VB) supports a text editor (not a word processor) that permits the writing and modification of program code. The editor.

The Program Editor 2

Entering the Editor

• The editor is normally entered by “double clicking” on an “Event Producing Object” in the workspace.

• The result is a code window which opens with the “subroutine” describing that event as the focus.

Page 3: The Program Editor1 Visual Basic (VB) supports a text editor (not a word processor) that permits the writing and modification of program code. The editor.

The Program Editor 3

Line Completion Help (1)

• When a line is being entered, the editor will make suggestions.

• When changing the caption on the button “cmdthingie” the editor presents suggestions when you add the “dot”.

Page 4: The Program Editor1 Visual Basic (VB) supports a text editor (not a word processor) that permits the writing and modification of program code. The editor.

The Program Editor 4

Line Completion Help (2)

• I actually typed:cmdthingie.cap=”start• (no capitals, only part of the

word caption, no spaces at all and no closing quote. The represents the <CR>.)

• The editor did the rest.

Page 5: The Program Editor1 Visual Basic (VB) supports a text editor (not a word processor) that permits the writing and modification of program code. The editor.

The Program Editor 5

Line Completion Help (3)

• When I typed a syntactically incorrect line, the line turned red, and a notice box was posted as soon as I struck the <CR> key or moved the cursor to a different line.

Page 6: The Program Editor1 Visual Basic (VB) supports a text editor (not a word processor) that permits the writing and modification of program code. The editor.

The Program Editor 6

Line Completion Help (4)

• When I completed the line by typing the “)” the line turned black again and was correctly spaced.

• Note I had typed no spaces.

Page 7: The Program Editor1 Visual Basic (VB) supports a text editor (not a word processor) that permits the writing and modification of program code. The editor.

The Program Editor 7

Line Completion Help (5)

• If I had typed:cmdthingee.

The editor would not have provided any help since I had no existing data object named “cmdthingee”.

Page 8: The Program Editor1 Visual Basic (VB) supports a text editor (not a word processor) that permits the writing and modification of program code. The editor.

The Program Editor 8

Line Completion Help (6)

• If I had completed the line anyhow and run the program, only then would the system be able to find this more complex syntactical error.

Page 9: The Program Editor1 Visual Basic (VB) supports a text editor (not a word processor) that permits the writing and modification of program code. The editor.

The Program Editor 9

The Helpful Program Editor

The Program Editor will correctly capitalize the names of existing data objects and legally spelled system commands. If you misspell one of them things remain in lower case.

The Program Editor will suggest and complete the spelling of properties of data objects. It will insert appropriate spaces and complete the lines of correctly entered command lines.