10-08-2001, 07:04 AM
can someone tell me what class mods are used for? is for creating classes (i didn't know that was do-able in vb)? i want to create a data type, but not just the lame old "types", i mean methods and all. i am familiar with building c++ classes, so any help would be appreciated.
10-08-2001, 07:11 AM
Classes allow you to create your own custom user objects.
You can do that in VB.
The only thing you can't have is inheritance. There is a dumbed-down version called interface inheritance (thru the "<font color=blue>Implements</font color=blue>" keyword) but its not terribly useful and I generally steer clear of it. I believe there is a tutorial (http://www.visualbasicforum.com/bbs/showflat.php?Cat=&Board=tu&Number=37198&page=0&view=collapsed&sb=5&o=186&part=) on objects/classes in VB somewhere in the Tutor's Corner.
-<font color=purple>The Hand</font color=purple>
<font color=green>All your code are belong to us...</font color=green> images/icons/tongue.gif
10-08-2001, 07:54 AM
As the hand said you don't have inheritance. What I do is that if I have a class that I want to inhance, I create the new class and declare a private or public intance of the class that I want to inhance, then I use the objects as if the class has been inhanced. I refer them with dots.
Another thing about classes in VB is that you can create properties to get/set values to private variables.
I hope this help.