Computer Store
store.prestwood.com
-Collapse +Expand
VB Classic
Search VB Classic Group:

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

VB Classic KB: OOP Topic



7 Articles Found in the OOP Topic 

  KB Article    

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

11 years ago

Code
Nothing New Since Your Last Visit  
11822
Hits

Visual Basic Classic

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

11 years ago

Code
Nothing New Since Your Last Visit  
9881
Hits

Visual Basic Classic

Mike Prestwood
3. VB Classic Inheritance (No, but see Implements.)

VB classic supports only a single "level" of interface inheritance (abstract class to implimentation class). See Implements in VB's help.

12 years ago, and updated 11 years ago

Code
Nothing New Since Your Last Visit
9112
Hits

Visual Basic Classic

Mike Prestwood
4. VB Classic Inheritance-Multiple (Not Supported)

VB classic supports only a single "level" of inheritance (abstract class to implimentation class).

12 years ago, and updated 11 years ago

Code
Nothing New Since Your Last Visit
5743
Hits

Visual Basic Classic

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.

12 years ago, and updated 11 years ago

Code
Nothing New Since Your Last Visit
10598
Hits

Visual Basic Classic

Mike Prestwood
6. VB Classic Member Method (sub, function)

VB classic uses the keywords sub and function. A sub does not return a value and a function does. Many programmers like to use the optional call keyword when calling a sub to indicate the call is to a procedure.

12 years ago, and updated 11 years ago

Code
Nothing New Since Your Last Visit
7967
Hits

Visual Basic Classic

Mike Prestwood
7. VB Classic Member Visibility

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

11 years ago

Code
Nothing New Since Your Last Visit
8108
Hits

Visual Basic Classic

Icon Legend:
Recent or not:
- Recent activity (within last two weeks).
- No activity last two weeks.
 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


©1995-2020 PrestwoodBoards  [Security & Privacy]
Professional IT Services: Coding | Websites | Computer Tech