Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ActiveX EXE as a common object

Status
Not open for further replies.

vaxman9

Programmer
Feb 26, 2002
80
US
Greetings All,

Please bear with me as I am a Visual FoxPro coder branching out ... ;-)

I have an application comprised of 3 separate programs that need to use a common set of variables. After researching, I believe I want to use an ActiveX EXE for the common object. I created an AxtiveX EXE with a Class Module. I added multiple properties to the Class Module, var1, var2, var3. I also create a single form (frmActiveX) within the ActiveX EXE project and placed some textboxes on it. This form is only created when I Initialize the Class.

I created two separate programs that reference my ActiveX EXE. When I run the first program, frmActiveX is created and shown. When the second program starts, I simply incremented a count to know how many programs are referencing the form.

Both programs can see and change the objects on the frmActiveX. The properties of the Class Module (var1, var2, var3) do not appear to be shared between the two programs, while the form frmActiveX does appear to a shared object.

What I am trying to accomplish is some sort of communication between processes. I can accomplish this using the frmActiveX, but is this the proper way to go?

I hope this makes sense and any suggestions would be greatly appreciated.

MSC
 
I found my own answer ...

I created a connector class that creates the main object with the first call, assigns it to a global variable and then tracks instances as each program invokes the ActiveX exe.

I would still appreciate any comments/suggestsion.
TIA
msc
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top