Results 1 to 5 of 5

Thread: Implementing Inheritance in VB6

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 1999
    Location
    London, UK
    Posts
    4
    Hi, my problem is simple.

    I have created an ActiveX DLL with one class in it called clsRefDataBC. The DLL references nothing and I want it to stay that way. I have created another ActiveX DLL that references the first one and I want the class in it to inherit the properties and methods of clsRefDataBC. How is this done?

    Thanks in advance.

    Steve

  2. #2
    Frenzied Member
    Join Date
    Mar 2000
    Posts
    1,089
    unfortunatly you have to do it manually, ie for each property and method of your base class you should define the same property/method in your inheriting class and use it to implement the method or get/set the property in the base class.

  3. #3

    Thread Starter
    New Member
    Join Date
    Jan 1999
    Location
    London, UK
    Posts
    4
    OK Sam, thanks for that. However, if I have an application that references the 2nd DLL, how do I create an instance of clsRefDataBC?

    Any Ideas.

  4. #4
    Frenzied Member
    Join Date
    Mar 2000
    Posts
    1,089
    I'm not entirely sure what you mean but I think I get the gist

    If you compile 1 dll and reference it from another dll then compile the 2nd dll then any program referencing the 2nd dll will not be able to get at the classes in the 1st dll.

    If you add the source code of the first dll to your project
    and compile to make a 2nd dll then any program referencing the 2nd dll will beable to get at the classes in the first dll

    hope this helps.

  5. #5
    Lively Member
    Join Date
    Mar 2000
    Posts
    82
    you can try "Implements clsRefDataBC" in the class mod of your 2nd .dll.

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