IT SOLUTIONS
Your full service technology partner! 
-Collapse +Expand
VB Classic
Search VB Classic Group:

Advanced
-Collapse +Expand VB Classic Store
   ► KBProgrammingVB ClassicTool Basics   Print This     

VB Classic KB: Tool Basics Topic



17 Articles Found in the Tool Basics Topic 

  KB Article    

Mike Prestwood
1. Mimic Short-Circuit Evalution in VB

Short-circuit evaluation is a feature of most languages where once an evaluation evaluates to False, the compiler evaluates the whole expression to False, exits and moves on to the next code execution line. In VB Classic, the if statement does not support short-circuit evaluation but you can mimic it. Use either an if..else if..else if statement or nested if statements. You will find that your code that makes use of this technique will be clearer and easier to maintain than the short-circuit equivalent and faster than ingnoring the issue.

14 years ago

Tip
Nothing New Since Your Last Visit
10014
Hits

Visual Basic Classic

Mike Prestwood
2. VB Classic Assignment (=)

VB Classic uses = for it's assignment operator.

14 years ago

Code
Nothing New Since Your Last Visit
6649
Hits

Visual Basic Classic

Mike Prestwood
3. VB Classic Case Sensitivity (No)

VB Classic is not case sensitive. If you type any other case for commands or variables, VB Classicwill change it to the "accepted" or "defined" case. For example, if you type msgbox it is converted to MsgBox.

14 years ago, and updated 13 years ago

Code
Nothing New Since Your Last Visit
8409
Hits

Visual Basic Classic

Mike Prestwood
4. VB Classic Code Blocks (End Xxx)

VB Classiccode blocks are surrounded by statement ending keywords that all use End such as End Sub, End If, and WEnd.

14 years ago, and updated 13 years ago
(1 Comments , last by Adkins.V )

Code
Nothing New Since Your Last Visit
8538
Hits

Visual Basic Classic

Mike Prestwood
5. VB Classic Comments (' or REM)

Commenting Code
VB Classic, like all the VB-based languages, uses a single quote (') or the original class-style basic "REM" (most developers just use a quote). VB Classic does NOT have a multiple line comment.

Directives - #

Directives are sometimes called compiler or preprocessor directives. A # is used for directives within VB Classic code. VB Classic offers only an #If..then/#ElseIf/#Else directive.

14 years ago, and updated 13 years ago
(8 Comments , last by asnaf.a )

Code

KB Post
Nothing New Since Your Last Visit
14145
Hits

Visual Basic Classic

Mike Prestwood
6. VB Classic Comparison Operators (=, <>)

Save as VB Classic. Common comparison operators:

= equal
<> not equal
< less than
> greater than
<= less than or equal
>= greater than or equal
14 years ago, and updated 13 years ago

Code
Nothing New Since Your Last Visit
9645
Hits

Visual Basic Classic

Mike Prestwood
7. VB Classic Constants (Const kPI = 3.1459)

Scope can be Public, Global, or Private. The use of the newer Public keyword is preferred to the older Global. Private Const is the same as just specifying Const.

14 years ago, and updated 13 years ago

Code
Nothing New Since Your Last Visit
8832
Hits

Visual Basic Classic

Mike Prestwood
8. VB Classic Deployment Overview

VB applications require the VB runtime DLL (for version 6, it's VB600.DLL) plus any additional dependencies you've added such as Crystal Reports, ActiveX controls, and DLLs.

You can use any of the many free and commercially available installation packages.

13 years ago

Code
Nothing New Since Your Last Visit
7378
Hits

Visual Basic Classic

Mike Prestwood
9. VB Classic Development Tools

Languages Focus: Development Tools

Primary development tool(s) used to develop and debug code.

VB Classic Development Tools

Microsoft Visual Basic 1...6. VB Classic is not compatible with VB.Net.

14 years ago, and updated 13 years ago

Code
Nothing New Since Your Last Visit
6766
Hits

Visual Basic Classic

Mike Prestwood
10. VB Classic End of Statement (Return)

Languages Focus: End of Statement

In coding languages, common End of statement specifiers include a semicolon and return (others exist too). Also of concern when studying a language is can you put two statements on a single code line and can you break a single statement into two or more code lines.

VB Classic End of Statement

A return marks the end of a statement and you cannot combine statements on a single line of code. You can break a single statement into two or more code lines by using a space and underscore " _".

14 years ago, and updated 13 years ago

Code
Nothing New Since Your Last Visit
6955
Hits

Visual Basic Classic

Mike Prestwood
11. VB Classic If Statement (If..ElseIf..Else..End If)

The End If is optional if you put your code on a single line.

14 years ago, and updated 13 years ago

Code
Nothing New Since Your Last Visit
9321
Hits

Visual Basic Classic

Mike Prestwood
12. VB Classic Literals (quote)

Literals are quoted as in "Prestwood". If you need to embed a quote use two quotes in a row.

14 years ago, and updated 13 years ago

Code
Nothing New Since Your Last Visit
9691
Hits

Visual Basic Classic

Mike Prestwood
13. VB Classic Overview and History

Language Overview: Class based language. Although you can create classes, VB Classic is not fully OOP. It is a traditional language with a few OOP extensions. You code in a traditional approach using functions, procedures, and global data, and you can make use of simple classes to help organize your reusable code. It also supports one-level abstract class to implemented class using the Implements keyword.

Target Platforms: Microsoft Visual Basic 6 is most suitable for creating Windows desktop applications that use the VB600.DLL runtime DLL within Microsoft Windows.

14 years ago, and updated 13 years ago

Code
Nothing New Since Your Last Visit
8517
Hits

Visual Basic Classic

Mike Prestwood
14. VB Classic Report Tools Overview

Crystal Reports was very popular with VB Classic developers and came bundled with Visual Basic 3 through 6. VB6 offers both Crystal Reports and the new Microsoft Data Report Designer.

14 years ago, and updated 14 years ago

Code
Nothing New Since Your Last Visit
8881
Hits

Visual Basic Classic

Mike Prestwood
15. VB Classic String Concatenation (& or +)

Although you can use either a & or a + to concatenate values, my preference is to use a + because more languages use it. However, if you use & then some type conversions are done for you. If you use + you will sometimes have to cast a value to concatenate it. For example, you will have to use CStr to cast a number to a string if you use the + operator as a concatenation operator.

14 years ago, and updated 13 years ago

Code
Nothing New Since Your Last Visit
8651
Hits

Visual Basic Classic

Mike Prestwood
16. VB Classic Unary Operators

An operation with only one operand (a single input) such as + and -.

14 years ago, and updated 13 years ago
(1 Comments , last by Baker.D )

Code
Nothing New Since Your Last Visit
8278
Hits

Visual Basic Classic

Mike Prestwood
17. VB Classic Variables (Dim x As Integer)

VB Classic is a loosely typed language. Declaring variables is optional unless you use the Option Explicit statement to force explicit declaration of all variables with Dim, Private, Public, or ReDim. Using Option Explicit is strongly recommended to avoid incorrectly typing an existing variable and to avoid any confusion about variable scope.

Undeclared variables are variants. To specifically declare a variant, use:

Dim x As Variant
Dim x 

Common data types include Byte (0..255), Boolean, Integer (2-byte integers), Long (4-byte integers), Currency, Single (32-bit number), Double (64-bit number), Date, String, and variant.

Variables declared with Dim at the module level are available to all procedures within the module. At the procedure level, variables are available only within the procedure.

14 years ago, and updated 13 years ago

Code

KB Post
Nothing New Since Your Last Visit
10706
Hits

Visual Basic Classic

Icon Legend:
Since your last logged visit:
- New to you or updated since your last visit (sign in now to activate).
- NOT new to you since your last visit (sign in now to activate).

New Visual Basic Classic Knowledge Base Post...

Share your knowledge with the WORLD! In addition to adding comments to existing posts, you can post knowledge you've acquired. We welcome full articles (intro with screen shots), general posts (shorter), and tidbits (tips, FAQs, definitions, etc.).

Post New...

Tidbit Post: Short Flashcard FAQ Definition Quick Tip Code Snippet
Longer Post: Full Article General Post File Link Error News
Other: Blog Topic
Or, if YOU have a question...
  Visual Basic Classic Message Board
Go ahead!   Use Us! Call: 916-726-5675  Or visit our new sales site: 
www.prestwood.com


©1995-2022 Prestwood IT Solutions.   [Security & Privacy]