Results 1 to 3 of 3

Thread: [RESOLVED] Mysterious VBControlExtender

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jan 2010
    Posts
    1,103

    Resolved [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.

  2. #2
    Default Member Bonnie West's Avatar
    Join Date
    Jun 2012
    Location
    InIDE
    Posts
    4,060

    Re: Mysterious VBControlExtender

    Quote Originally Posted by Jonney View Post
    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 View Post
    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)

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Jan 2010
    Posts
    1,103

    Re: Mysterious VBControlExtender

    Quote Originally Posted by Bonnie West View Post
    See VBControlExtender Object, Add Method (Controls Collection) and How To Dynamically Add Controls to a Form with Visual Basic 6.0.



    Here's another example of creating an ActiveX control (the WebBrowser control) at run-time.
    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
  •  



Click Here to Expand Forum to Full Width