CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    May 2000
    Location
    Switzerland
    Posts
    8

    Enhance existing control

    Hi there:

    Can someone tell me how to enhance an existing ActiveX control such as MS Agent that consists of collections. In the ActiveX Control Interface Wizard, it will not show any properties, methods and events for any collections such as ballons, animationNames etc.

    Because of the program i am using, i need an activeX that does not contain any colections, so i decide to enhance agent by making my own activeX but with no collections, instead i will to expose all the collections properties, methods and events in my activeX.

    Any help or any insights will be much appreciated.

    Cecil

    Medical Doctor
    CBT/Web CBT Consultant
    Network Supporter
    Multimedia Developer
    VB and VBA Specalist

    Company URL: Http://webcbt.ch
    Toolbook Developers Network URL: Http://webcbt.ch

  2. #2
    Join Date
    Oct 2000
    Location
    JHB South Africa
    Posts
    27

    Re: Enhance existing control

    Hi.

    Getting rid of collections will mean you are removing array information with a structure built into it.
    Unfortunately, there is a very good reason for the collection that is used. It means that all the information is stored in an indexed way - including pictures.
    Should you now remove this ability, you cannot add a new entry of whatever is in the collection. You have to now add functions in ypur property pages that will write away the information somewhere and at the same time you will have the problem that you will have to use references to objects such as images.
    These objects will have to be installed with your activex and you must do it in such a way that a user cannot delete it.


  3. #3
    Join Date
    May 2000
    Location
    Switzerland
    Posts
    8

    Re: Enhance existing control

    Hi there:

    Thanks for the reply, but i do not want to remove the colections from the MS Agent, i just want in my activeX to include my own properties, methods and events that will access the corresponding MS Agent properties, methods and events.

    So, how can i proceed in ActiveX Control Interface Wizard to expose those sub-class properties etc, or is there no way to do it

    Medical Doctor
    CBT/Web CBT Consultant
    Network Supporter
    Multimedia Developer
    VB and VBA Specalist

    Company URL: Http://webcbt.ch
    Toolbook Developers Network URL: Http://webcbt.ch

  4. #4
    Join Date
    Oct 2000
    Location
    JHB South Africa
    Posts
    27

    Re: Enhance existing control

    Hi Cecil.

    I think you got me there.
    If you look at your Control Wizard datatype options, you will see that there is no collection or special data type other than the normal ones.
    My guess is that you might need to insert the MS Agent control into your new control, use it as normal, and basically only let your ActiveX become a shell that shields the properties, events and methods from the user calling it.

    Other than that I am not sure you can access those properties (Find out more about the Propertybag object and see if it allows you to access another control's properties.)


  5. #5
    Join Date
    May 2000
    Location
    Switzerland
    Posts
    8

    Re: Enhance existing control

    Hi there:

    Thanks a lot. You mean, i should using the wizard this way:
    I should let the wizard build one script for me, say showBallon, and use that as a template to build the rest including collections' properties, methods etc?

    Will that be an alternative method?

    Cecil

    Medical Doctor
    CBT/Web CBT Consultant
    Network Supporter
    Multimedia Developer
    VB and VBA Specalist

    Company URL: Http://webcbt.ch
    Toolbook Developers Network URL: Http://webcbt.ch

  6. #6
    Join Date
    Oct 2000
    Location
    JHB South Africa
    Posts
    27

    Re: Enhance existing control

    I guess it could be called alternative, but at the same time you will be making use of the already written object.
    This actually demonstartes how well the OOP works for us.

    Provided you may re-distribute that object (MS Agent), your ActiveX will have to install and register the MS Agent object before it will work on a user's machine.

    You propagate the properties that you require and map it in the wizard to the properties of the object. This means that a property change on your control directly Lets and Gets the properties from the MS Agent object. You only map the properties that you require this way and add your own properties that may do other things for you.



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

Featured