|
-
Jan 29th, 2015, 04:54 AM
#1
Thread Starter
Frenzied Member
[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.
Last edited by Jonney; Jan 29th, 2015 at 05:17 AM.
-
Jan 29th, 2015, 03:22 PM
#2
Re: Mysterious VBControlExtender
 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.
 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.
On Local Error Resume Next: If Not Empty Is Nothing Then Do While Null: ReDim i(True To False) As Currency: Loop: Else Debug.Assert CCur(CLng(CInt(CBool(False Imp True Xor False Eqv True)))): Stop: On Local Error GoTo 0
Declare Sub CrashVB Lib "msvbvm60" (Optional DontPassMe As Any)
-
Jan 29th, 2015, 07:10 PM
#3
Thread Starter
Frenzied Member
Re: Mysterious VBControlExtender
 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().
Last edited by Jonney; Jan 29th, 2015 at 07:55 PM.
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
|