views:

35

answers:

1

I'm try develop an ActiveX Control in VB6. It have one UserControl and one form. And the problem that i can't call usercontrol function's (even public) from this form. I can't type something like

UserControl.DoSomething 'not working

It work's only if create copy of usercontrol (UserControl1, for example). But in resulting i need one ocx file (component). So i can't create another form with copy of usercontrol in project

+1  A: 

I'm suspecting you've set your project type to an ActiveX Control, which will not let you run the project within a form. You would have to make the actual OCX file, import it into another project and test from there as it seems you have already figured out.

What might be helpful is to set your project type to ActiveX EXE during your testing and preliminary development until you get the control working the way you want to, and then change the project type back to ActiveX Control and remove any forms used for debugging when you are ready to make your OCX file.

Heather