Results 1 to 4 of 4

Thread: Implements

  1. #1

    Thread Starter
    Fanatic Member SeaHag's Avatar
    Join Date
    Jul 2001
    Location
    Lake Huron
    Posts
    901

    Implements

    When I try to Implement an interface, it doesn't show up in
    the project properties dropdown boxes.
    What Gives????

    Seahag

  2. #2
    Hyperactive Member schuurke28's Avatar
    Join Date
    Feb 2001
    Posts
    402
    can u be more specific plz?
    are u adding an interface to a project? or what do u mean?

  3. #3

    Thread Starter
    Fanatic Member SeaHag's Avatar
    Join Date
    Jul 2001
    Location
    Lake Huron
    Posts
    901
    Yes I am. I have made a reference to the project.
    As well, I tested to see if something appeared
    in the `dropdown boxes by
    VB Code:
    1. dim withevents sdfs as textbox
    .. and it worked

  4. #4
    New Member
    Join Date
    Dec 2001
    Posts
    2

    Unhappy

    Ive been having the same problem with the Implements statement.

    I understand that there are two distinctive types of inheritence;
    Interface Inheritence
    Class Inheritence

    I have been trying to implement classes in VB6 but I was told that you can only achieve a form of inheritence through Interface implementation.

    To get round this I defined an Interface for a certain type of class.
    Then made another class that implements this interface and added all of the generic code to this class, this is now the class that I intended to be the base class in the first place.

    Any derived classes must implement the interface but also contain an aggregate of the class that contains the code which can be delegated to or overidden.

    This seems a poor way to achieve polymorphism to me as it requires more classes than you really should have causing confusion and extra overhead.

    I have just bought Dan Applemans book on COM/ActiveX which is brilliant by the way, but he demonstrates the use of class implementation in VB6 exactly like I was trying to do in the first place.
    I quote
    "You don't need to use an empty abstract class as the source for your interface definition, however. Having code in the source class does no harm whatsoever."

    I dont believe considering Dan Applemans technical brilliance that he has got this wrong and he must have used this technique many times if hes using it as an example in his book.

    But why then will the Declarations combo box not expose the properties of base classes when I try it?

    Someone please explain this phenomenon if you can.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width