Loading an ActiveX Control Dynamically 
Author Message
 Loading an ActiveX Control Dynamically

Hi John:

>I am desperately trying to figure out how to load an ActiveX Control
>created in VB5 dynamically at run time.

AFIK there is no way other than to place one of the controls on the
form at design time with the Index property set to zero.  Then
you can load a new instance as such:

  Load MyControl(NewIndex)
  MyControl(NewIndex).Move ..etc
  MyControl(NewIndex).Visible = True

Hope this helps,


Fri, 31 Mar 2000 03:00:00 GMT  
 Loading an ActiveX Control Dynamically

I am desperately trying to figure out how to load an ActiveX Control
created in VB5 dynamically at run time. To start with I thought this
would be a fairly simple thing to do.

I found a container control: vbActiveContainer but could not find any
examples or documentation.

Basically what I want to do is load various ActiveX Controls into a
container at run time.

Am I right in thinking that your control can do this ?

The furthest I can work out is:  

  Dim myControl As Object

  Set myControl = GetObject("C:\Temp\Project1.ocx")
  Set vbActiveContainer1.Container = myControl

Any help would be most welcome at this time.


John Stamp

Fri, 31 Mar 2000 03:00:00 GMT  
 [ 2 post ] 

 Relevant Pages 

1. Dynamically Loading User ActiveX Controls

2. Loading ActiveX Control Dynamically

3. Loading ActiveX Controls Dynamically

4. W2K Doesn't Load ActiveX Control But W98 and WXP Do Load ActiveX Control Correctly

5. ActiveX - Loading controls dynamically?

6. Can VB dynamically load a VB Activex Dll ?

7. Dynamically loading ActiveX Ctrls into a VB container?

8. Dynamically loaded array of controls inside user control: out of memory error

9. Event Handling Between Dynamically Loaded User Controls using vb.net

10. loading controls dynamically

11. How to dynamically load and unload user controls?

12. Dynamically loaded forms or controls


Powered by phpBB® Forum Software