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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Starting/Interacting with Other VFP EXE

Status
Not open for further replies.

volfreak

Programmer
Nov 6, 2000
42
0
0
US
All,

I have a VFP executable that I'd lilke to be able to launch from within a different VFP EXE. Once I've launched, I'd like to be able to access/call one of the forms that's in the 1st EXE and have the user interact with that form. And then when they are done, return them to the original (new) EXE.

I understand the process for launching and interacting with Word, Excel and other apps but I'm not sure of the process for doing so with a VFP app. Must it be made into a COM object or is there a way to call the EXE and then call the forms? I've tried CREATEOBJECT(c:\path\myexe.exe) but it says the class definition is not found. I understand why it says that, making me think it must also be built into a COM object at which point I could interact with it in this manner.

Thoughts? Help? ;-)
Cheers,
Jay
 
you have to have all your code, forms, and such as a class in the project. with the class open, select from the foxpro menu, class->class info. select the check box OLE public. now compile to a EXE OR COM.

now you can createobject of any class componet. Attitude is Everything
 
There are many ways for VFP apps to communicate with each other - the easiest is to use a table to exchange data and make requests of each other. If a VFP app is a COM server, then yes you can call it just like any other COM object. You can also use "sockets" for them to talk to each other. Now, you could also create a Web Service - even if it's just on an intra-net!

You choose based on your needs and environment. Do searches at in the VFP area - there is infomation and source code (and some warnings and bug fixes!).

Rick
 
Thanks for the suggestions. I was on the right path but needed a little light.

Cheers,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top