borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (Shell Control in a form)Next Topic (Access AxtiveX) New Topic New Poll Post Reply
AndreaVB Forum : ActiveX : Share variables between application and ActiveX-control in VB6
Poster Message
ocliff
Level: Guest


icon Share variables between application and ActiveX-control in VB6

Hi,

I have an application (vb6) where you can create polygons and such on a picturebox. Now I have converted the picturebox to be a picturebox in an ActiveX-control, so that I can reuse it in different places in the application. I have defined some own types in a class in the control. In the main application I have created variables of these types and I pass them to the control for drawing.

I have read here that you should not pass the variables as variants/objects, but this is the only way it will work. The problem is that when I pass the variable (byref) the control creates a copy. Since there can be a lot of polygons to draw, this seems to be a not-so-clever solution.

The application and the control should in some way just share the variables. Is this possible in VB6? I want to pass the variable byref and then the activex should actually use that variable and not a local copy.

02-09-2004 at 10:19 AM
| Quote Reply
AndreaVB Forum : ActiveX : Share variables between application and ActiveX-control in VB6
Previous Topic (Shell Control in a form)Next Topic (Access AxtiveX) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder