What is the use of class module 
Author Message
 What is the use of class module

Hello all , may i know what is the use of class module , is it the same as
C++ class ? Please show me some example if you can. Thanks.


Mon, 26 Mar 2001 03:00:00 GMT  
 What is the use of class module
On Thu, 8 Oct 1998 09:28:31 +0800, "Liew Hock Wai"

Quote:

>Hello all , may i know what is the use of class module , is it the same as
>C++ class ? Please show me some example if you can. Thanks.

That's a question you can't answer in a word or two and one that will
most likely start a controversy.  There are many purists and C++
devotees that get upset if you say anything in VB is "the same as
C++".

If you use the definition that a class is used to define an object
then yes I would say that the are basically the same, that's using the
old cookie/cookie cutter analogy you learned in college.  It's a
module that contains propeties and methods use to define an object
(the same old characteristics and behaviors you read about learning
C++)

For examples, there are plenty in the VB Books Online, and many
excellent books that describe OOP from VBs perspective.  I'd suggest
Deb Kurata's book -- Doing Objects in VB5.



Mon, 26 Mar 2001 03:00:00 GMT  
 What is the use of class module
Liew,

Quote:
>Hello all , may i know what is the use of class module , is it the same as
>C++ class ? Please show me some example if you can. Thanks.

Very similar to a C++ class, yes. One big difference is that you define a
class using the class keyword in C++ and can define as many classes as you
want in a single file. VB, on the other hand, makes everything that appears
within the same .cls module part of the same class.

--
Jonathan Wood
SoftCircuits Programming
http://www.softcircuits.com



Mon, 26 Mar 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. VB6 class module turns into regular module using VB6 IDE

2. Using a UDT in a Class method, how to make a class module public

3. Class modules 97 - Refering to array within a custom class module

4. Accessing procedures of a class module from another class module

5. using class module for report totals?

6. Using a class module

7. Import Class Modules using LoadFromText

8. Object Hierarchy using Class Modules

9. Using class modules in a code library

10. Cannot see class modules when .mde used as reference

11. How to invoke a method in a class module using CALLTHIS()

12. Error using user-defined type in parameter of public procedure in a class module

 

 
Powered by phpBB® Forum Software