|
-
Apr 19th, 2002, 08:31 AM
#1
Thread Starter
New Member
Dynamically loading an ActiveX Control
Can anyone help me to dynamically set a reference to an ActiveX control and disply the control on my form.
I have created two ActiveX controls, I will call them myControl1 and myControl2, which work fine when I drop them directly onto my form at design time. I can access their properties and respond to their events.
However I wish to display only one of the controls at runtime, and which one will depend upon how the form is accessed.
I have tried declaring an object variable of type myControl1/myControl2 and then using this to access the controls properties. Doing this I get a runtime error indicating that the object doesn't exist.
Can anyone tell me what I am doing wrong/what I need to do in order to be able to add the control to the form at runtime rather than at design time.
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
|