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

-Collapse +Expand VB Classic Store

Prestwood eMagazine

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

   ► KBProgrammingVB ClassicOOP   Print This     
  From the January 2016 Issue of Prestwood eMag
VB Classic OOP:
VB Classic Interfaces
Posted 16 years ago on 10/24/2008 and updated 2/21/2009
VB Classic Code Snippet:
 A flashcard from our VB Classic Flashcards Library
 A code snippet from our VB Classic Code Snippets Page


General Info: Interface

An element of coding where you define a common set of properties and methods for use with the design of two or more classes.

Both interfaces and abstract classes are types of abstraction. With interfaces, like abstract classes, you cannot provide any implementation. However, unlike abstract classes, interfaces are not based on inheritance. You can apply an Interface to any class in your class tree. In a real sense, interfaces are a technique for designing horizontally in a class hierarchy (as opposed to inheritance where you design vertically). Using interfaces in your class design allows your system to evolve without breaking existing code.

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.

Default Interface Visibility: Friend

If you do not specify an interfaces visibility, the default is Friend but an interface's members are always public -- which makes sense but is noteworthy.

More Info

Definition:  Interface


Share a thought or comment...
Write a Comment...
Sign in...

If you are a member, Sign In. Or, you can Create a Free account now.

Anonymous Post (text-only, no HTML):

Enter your name and security key.

Your Name:
Security key = P1185A1
Enter key:
Code Contributed By Mike Prestwood:

Mike Prestwood is a drummer, an author, and creator of the PrestwoodBoards online community. He is the President & CEO of Prestwood IT Solutions. Prestwood IT provides Coding, Website, and Computer Tech services. Mike has authored 6 computer books and over 1,200 articles. As a drummer, he maintains and has authored 3 drum books. If you have a project you wish to discuss with Mike, you can send him a private message through his PrestwoodBoards home page or call him 9AM to 4PM PST at 916-726-5675 x205.

Visit Profile

 KB Article #101442 Counter
Since 10/24/2008
Go ahead!   Use Us! Call: 916-726-5675  Or visit our new sales site:

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