[RESOLVED] Mysterious VBControlExtender
From my trail, I come to know VBControlExtender has some disadvantages, The Subclassing Procedures in my ActiveX (UC) are not functioning any more. After a thought, it won't support subclassing as it is (some sort of like VBControlExtender + Class = ActiveX).
I check MSDN, there's very limit info. Please educate me.
C#/VB.NET doesn't have such thing, e.g. In .NET, we can do something like Dim ShadeUC as New MyActiveX but VB6 doesn't allow. I have to put ActiveX on the form so that I can use Events,Properties and Methods.
Edited: I Move Subclass procedures from my ActiveX into my Form, now I can do Subclassing. I feel comfortable now:). I don't know whether there's more easier or better way.
Re: Mysterious VBControlExtender
Quote:
Originally Posted by
Jonney
I check MSDN, there's very limit info. Please educate me.
See VBControlExtender Object, Add Method (Controls Collection) and How To Dynamically Add Controls to a Form with Visual Basic 6.0.
Quote:
Originally Posted by
Jonney
C#/VB.NET doesn't have such thing, e.g. In .NET, we can do something like Dim ShadeUC as New MyActiveX but VB6 doesn't allow. I have to put ActiveX on the form so that I can use Events,Properties and Methods.
Here's another example of creating an ActiveX control (the WebBrowser control) at run-time.
Re: Mysterious VBControlExtender
Quote:
Originally Posted by
Bonnie West
The WebBrowser is good example.
Somehow the VBControlExtender didn't executive my ActiveX's UserControl_ReadProperties, so my Subclass can't be initialized. I will make more test.
Thank you Sir.
Edited: Confirmed VBControlExtender didn't go to ReadProperties, But does go to UserControl_InitProperties().