|
-
Jan 17th, 2001, 07:46 AM
#1
I just wanted to know...
What exactly is a Class Module? and How does it differ from a BAS Module?
(I need a new thing to start learning so I figured why not Class Mods)
(and if anyone feels up to it...post some code for some simple class modules and maybe how to implement them)
Thanks!
JPnyc rocks!! (Just ask him!)
If u have your answer please go to the thread tools and click "Mark Thread Resolved"
-
Jan 17th, 2001, 10:25 AM
#2
transcendental analytic
The idea with Object Orientation is to encapsulate code into Classes which will act as a blueprint for objects. Objects are way to group components and properties, and methods that are put together as an abstract entity. If you already know, user defined types (UDT) are way of doing this, grouping variables into one entity you can work with and pass around as one variable. The difference between them and Classes are that you group methods to act as a interface for the variables. You can't really compare standard module with Classmodules. They are both code repositories but standard module code is global within the project. The classmodules although you have to access them by their name as objects, they can be shared and passed between projects, if you put them in ActiveX Dll's or Exe's.
There is still much to say about Object Orientation in general, but i'm sure you wouldn't want to have it all at once. There's many topics around the forums about classmodules if you want to read later, you could just search on the topic.
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Jan 17th, 2001, 03:27 PM
#3
cool...
Thanks fors the 'quick' overview...I think I am grasping the idea behind it.
Thank you very much!
(The UDT was the perfect way to describe it...I understood that)
JPnyc rocks!! (Just ask him!)
If u have your answer please go to the thread tools and click "Mark Thread Resolved"
-
Jan 17th, 2001, 03:38 PM
#4
-
Jan 17th, 2001, 09:12 PM
#5
Fanatic Member
I found the com course part one a very clear and very easy intro to Classes, check it out and make your own dog class step by step including Enum and Event:
http://www.vb-world.com/activex/comcourse/
-
Jan 18th, 2001, 08:29 AM
#6
JPnyc rocks!! (Just ask him!)
If u have your answer please go to the thread tools and click "Mark Thread Resolved"
-
Jan 18th, 2001, 09:18 AM
#7
Fanatic Member
Dont forget though that true OOP will allow inheritance, polymorphism and encapsulation. VB does not have inheritance and its polymorphism sucks. They have just implemented the easy bit. Try Delphi - that really is OOP.
P.
Not nearly so tired now...
Haven't been around much so be gentle...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|