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

Advanced
-Collapse +Expand VB Classic Store

Prestwood eMagazine

January Edition
Subscribe now! It's Free!
Enter your email:

   ► KB ►► ProgrammingVB Classic   Print This    All Groups  

Visual Basic Classic Most Read KB Posts

Page Contents


Most Read KB Articles Since 3/28/2008

Visual Basic Classic Group

  KB Article    

Mike Prestwood
1. VB Classic Logical Operators (and, or, not)

VB Classic logical operators:

and and, as in this and that
or or, as in this or that
Not Not, as in Not This

Posted to KB Topic: Language Basics
13 years ago, and updated 13 years ago
(7 Comments , last by pugnacious.p )

Code

Article
Nothing New Since Your Last Visit  
17450
Hits

Mike Prestwood
2. 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.

Posted to KB Topic: Tool Basics
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

Mike Prestwood
3. VB Classic Custom Routines (Sub, Function)

VB Classic is a non-OOP language with some OOP features. It offers both Subs and Functions. A Sub does not return a value while a Function does. When Subs and Functions are used in a class module, they become the methods of the class.

Posted to KB Topic: Language Details
14 years ago, and updated 13 years ago

Code

KB Post
Nothing New Since Your Last Visit
12745
Hits

Mike Prestwood
4. VB Classic Constructors (Class_Initialize)

When an object instance is created from a class, VB6 calls a special parameter-less sub named Class_Initialize. Since you cannot specify parameters for this sub, you also cannot overload it.

When a class is destroyed, VB6 calls a special sub called Class_Terminate.

Posted to KB Topic: OOP
13 years ago
(1 Comments , last by Andrew.L2 )

Code
Nothing New Since Your Last Visit  
12485
Hits

Mike Prestwood
5. VB Classic Interfaces

VB6 has limited support for interfaces. You can create an interface of abstract methods and properties and then implement them in one or more descendant classes. It's a single level implementation though (you cannot inherit beyond that). The parent interface class is a pure abstract class (all methods and properites are abstract, you cannot implement any of them in the parent class).

In the single level descendant class, you have to implement all methods and properties and you cannot add any. Your first line of code is Implements InterfaceName.

Posted to KB Topic: OOP
14 years ago, and updated 13 years ago

Code
Nothing New Since Your Last Visit
11163
Hits

Mike Prestwood
6. VB Classic Array (x = Array())

Arrays in VB Classic use a 0-based indice. UBound returns -1 if the array has no elements, 0 if it has 1, 1 if it has 2, etc.

Posted to KB Topic: VB Classic
12 years ago

Code
Nothing New Since Your Last Visit  
10769
Hits

Mike Prestwood
7. 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.

Posted to KB Topic: Tool Basics
14 years ago, and updated 13 years ago

Code

KB Post
Nothing New Since Your Last Visit
10706
Hits

Mike Prestwood
8. VB Classic Destructor

When an object instance is destroyed, VB6 calls a special parameter-less sub named Class_Terminate. For example, when the variable falls out of scope. Since you cannot specify parameters for this sub, you also cannot overload it.

When an object instance is created from a class, VB6 calls a special sub called Class_Initialize.

Posted to KB Topic: OOP
13 years ago
(2 Comments , last by Joanna.W )

Code
Nothing New Since Your Last Visit  
10422
Hits

Mike Prestwood
9. VB Classic Empty String Check (Len(s&vbNullString))

In VB Classic, you have to add an empty string to the value being compared in order to get consistent results. For example, add &"" to your string varilable or it's code equivalent &vbNullString. Then compare to an empty string or verify it's length to 0 with Len.

Posted to KB Topic: VB Classic
13 years ago

Code
Nothing New Since Your Last Visit
10256
Hits

Mike Prestwood
10. VB Classic Associative Array (Collection)

In addition to Add and Item, collections also offer Count and Remove. Notice that Add uses the format of Value, Key (which is backwards from many other languages).

Posted to KB Topic: Language Details
14 years ago, and updated 13 years ago

Code
Nothing New Since Your Last Visit
10031
Hits



Most Read by Members

Visual Basic Classic Group

  KB Article    

Mike Prestwood
1. 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.

Posted to KB Topic: Tool Basics
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

Mike Prestwood
2. VB Classic Logical Operators (and, or, not)

VB Classic logical operators:

and and, as in this and that
or or, as in this or that
Not Not, as in Not This

Posted to KB Topic: Language Basics
13 years ago, and updated 13 years ago
(7 Comments , last by pugnacious.p )

Code

Article
Nothing New Since Your Last Visit  
17450
Hits

Mike Prestwood
3. VB Classic Destructor

When an object instance is destroyed, VB6 calls a special parameter-less sub named Class_Terminate. For example, when the variable falls out of scope. Since you cannot specify parameters for this sub, you also cannot overload it.

When an object instance is created from a class, VB6 calls a special sub called Class_Initialize.

Posted to KB Topic: OOP
13 years ago
(2 Comments , last by Joanna.W )

Code
Nothing New Since Your Last Visit  
10422
Hits

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.

Posted to KB Topic: Tool Basics
14 years ago, and updated 13 years ago
(1 Comments , last by Adkins.V )

Code
Nothing New Since Your Last Visit
8538
Hits

Mike Prestwood
5. VB Classic Unary Operators

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

Posted to KB Topic: Tool Basics
14 years ago, and updated 13 years ago
(1 Comments , last by Baker.D )

Code
Nothing New Since Your Last Visit
8278
Hits

Mike Prestwood
6. Visual Basic User Group Meeting Mike and Brian Prestwood presenting on the Unified Modeling Language.
Posted to KB Topic: VB Classic
16 years ago, and updated 14 years ago

News
Nothing New Since Your Last Visit
4163
Hits

Mike Prestwood
7. VB Classic Constructors (Class_Initialize)

When an object instance is created from a class, VB6 calls a special parameter-less sub named Class_Initialize. Since you cannot specify parameters for this sub, you also cannot overload it.

When a class is destroyed, VB6 calls a special sub called Class_Terminate.

Posted to KB Topic: OOP
13 years ago
(1 Comments , last by Andrew.L2 )

Code
Nothing New Since Your Last Visit  
12485
Hits

Mike Prestwood
8. 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.

Posted to KB Topic: Tool Basics
14 years ago, and updated 14 years ago

Code
Nothing New Since Your Last Visit
8881
Hits

Mike Prestwood
9. VB Classic Array (x = Array())

Arrays in VB Classic use a 0-based indice. UBound returns -1 if the array has no elements, 0 if it has 1, 1 if it has 2, etc.

Posted to KB Topic: VB Classic
12 years ago

Code
Nothing New Since Your Last Visit  
10769
Hits

Mike Prestwood
10. VB Classic Member Visibility

In VB Classic, the keywords Private, Friend, Public, and Static are used to set access levels for declared elements.

Posted to KB Topic: OOP
13 years ago

Code
Nothing New Since Your Last Visit
8604
Hits
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).
Go ahead!   Use Us! Call: 916-726-5675  Or visit our new sales site: 
www.prestwood.com


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