|
Thread: OOP
-
Nov 28th, 2000, 12:14 AM
#1
Thread Starter
Hyperactive Member
Can anyone brefly explain how to do object orinted programing in VB6, even a simple exampl with just private, and public functions, and private and public vars, and i dont know if one is needed, but a constructor. Thank you very much.
-
Nov 28th, 2000, 12:32 AM
#2
transcendental analytic
I don't think you can make contructors in vb6, you just use new keyword to create objects.
Place a classmodule in your project and add a private and a public variable:
Code:
private privatevar as long
private ppublicvar as long
Property Get publicvar() as long
publicvar=ppublicvar
end property
Property Let publicvar(newvalue as long)
ppublicvar=newvalue
end property
You can of course declare a public variable public but it won't gain anything (except for time), vb does automatically make a property of it anyway.
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.
-
Nov 28th, 2000, 07:07 PM
#3
Thread Starter
Hyperactive Member
What does property let and get do? Like say I wanted to do this, I hope you know some C++
class
{
private:
int X;
int Y;
int HI(int X);
public:
bool GetThis();
bool YN;
};
How could I do something like that but VB6?
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
|