Results 1 to 3 of 3

Thread: What is a Class Module?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2000
    Posts
    95

    Post

    Can someone explain to me (in regular english) what a class module is? and what it does?

  2. #2
    Member
    Join Date
    Jan 1999
    Location
    Vancouver, BC, Canada
    Posts
    32

    Post

    There's no short answer to this, really...

    Class modules are what create objects at run-time. A Class module is a special module that allows you to expose ONLY those properties, methods and events that you WANT exposed to other parts of your program, and 'hides' (encapsulates) the rest of your code that you don't want Public.

    Class modules are the foundation of COM, DCOM, and the whole concept of code reuse. Also, Class modules allow you to create multiple objects from the same class, BUT each and every one of those objects has its OWN unique data, completely independent from the other objects that were created from the same class.

    I STRONGLY encourage you to check out these MSDN articles:
    http://msdn.microsoft.com/library/pa...ctsclasses.htm
    http://msdn.microsoft.com/library/te...ifacebased.htm

    They're both excellent, and will help you gain a basic understanding. You might also consider picking up a few books. I recommend 'Beginning Visual Basic 6 Objects' by Peter Wright (published by Wrox Press).

    Programming with objects will change your life Good luck!

  3. #3
    Guest

    Post

    I heard a good analogy to visualise....

    a class module is the cookie cutter, you describe through code what the cookie cutter looks like. you then use the cutter to create several identical "cookies" (nothing to do with the internet). thats how i like to think of classes!

    ------------------

    Wossname,
    Email me: [email protected]

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