Click to See Complete Forum and Search --> : Enhance existing control
Cecil Cheah
March 25th, 2001, 04:05 PM
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
wbeetge
March 26th, 2001, 12:54 AM
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.
Cecil Cheah
March 26th, 2001, 02:28 AM
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
wbeetge
March 26th, 2001, 03:28 AM
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.)
Cecil Cheah
March 26th, 2001, 05:54 AM
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
wbeetge
March 26th, 2001, 06:22 AM
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.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.