开发者

ActiveX Control with included Form

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 pr开发者_Python百科oject


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜