CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2001
    Posts
    7

    how to subclass a user defined class?

    Is there any way to create a subclass of a user-defined class module in VB? (not activeX controls or Window objects).
    What I need a subclass for, is to inherit properties of a higher-level class.
    thanks much,
    Ella


  2. #2
    Join Date
    Apr 2000
    Posts
    737

    Re: how to subclass a user defined class?

    For COM object, you have two choices, Containment or Aggregation. For your case, I think you should use Aggregation. Most of the time, people do it using C++, because doing it in VB is a bit difficult (maybe VB.Net will change this). I read a book, Advanced VB 6 by matthew curland which have some functions that help in this, probably you need to have a look on it.

    But, if I am not mistaken, if the object doesn't support aggregation, then the only way is use containment.





    HTH

    cksiow
    http://vblib.virtualave.net - share our codes

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

Featured