Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to create a custom control class?
Message
 
To
25/07/2004 05:14:11
General information
Forum:
Visual Basic
Category:
Other
Miscellaneous
Thread ID:
00927670
Message ID:
00927702
Views:
15
If you want to extend an existing control to make your own, the "ActiveX Control" template is the way to go.

But don't forget that VB6 is not OO and does not supports inheritance (like VFP and VB.Net). So you need to re-implement (or redirect) everything. I suggest you use the "VB 6 ActiveX Ctrl Interface Wizard" to start up.



>Hi,
>
>I'm kind of new to Visual Basic 6 and trying to learn its ways.
>Having quite some experience with Visual FoxPro, I imagined that Visual Basic would be pretty much of the same with a different syntax, however, I have the following problem:
>
>I want to create a custom control (a custom class), like a textbox, but when I add a class it seems to be reserved for functions only, thus no visual components possible. I thought the UserControl approach was the answer but I have no idea how I can instantiate it in code, besides that all the documents I read about it insinuate the UserControl is some kind of ActiveX base only.
>In Visual FoxPro this is as easy as 1+1, so I refuse to believe that the same action demands so much work(around) in an older language as Visual Basic.
>
>Could anyone out there give me a hint on how I can accomplish this???
>
>
>Thanks in advance.
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Previous
Reply
Map
View

Click here to load this message in the networking platform