communicate between VFP 9 app and a VB 2005 app

G

Guest

im trying to create a vfp app that can talk to a vb 2005 app to launch forms

basically, i want to tell the vfp app to launch a form when they select an
option from the vb menu that hasnt been converted to vb yet...

any suggestions???
 
C

Cindy Winegarden

Hi Brad,

If you were using VFP to open a VB form you would create the form in a class
library, reference it in VFP, and then use
oForm = CreateObject("VBLibrary.VBForm") ; oForm.Show

If you're going the other way and opening a VFP form from a menu click in a
VB app, it seems like you should be able to use similar code.

--
Cindy Winegarden
(e-mail address removed)


VFP OLE DB: http://msdn2.microsoft.com/en-us/vfoxpro/bb190232.aspx
VFP ODBC: http://msdn2.microsoft.com/en-us/vfoxpro/bb190233.aspx
 
G

Guest

thanks for the reply....

let me be a little more clear

1) we have a legacy app (in vfp 9)
2) we are starting on vb 2005 app to replace it
3) we want to be able to call the vfp forms in vfp code from the vb app
until their converted to .net

so far...i hase created an vfp automation server app

i can call it from vb

i can tell it to run a form that is apart of it

now im trying an additional step of having the automation server call an
..app file which isnt working....

my idea was to create app files with groups of screens in them and call the
app from the vfp server, but i am stuck getting error calling .init....

can an automation server only call automation server apps???
 
C

Cindy Winegarden

Hi Brad,

A VFP .APP file is compiled code that can only be run from inside the VFP
IDE or can be called by a VFP .EXE file, which has code added to make it
able to be executed against the VFP runtime files by themselves.

The correct way to do what you want is to compile the code as a "Win 32
executable / COM server (exe)" or as a "Single-threaded COM server (dll)"
(or Multi-threaded).

As far as instantiating an object from a Fox DLL in VB.NET, and then using
the Fox DLL to instantiate another object from a second Fox DLL, I did an
experiment (wrote a text file instead of instantiating a form) and was
successful with a VB.NET project instantiating an object from Fox DLL #1
which instantiated an object from Fox DLL #2, which also wrote a text file
to verify its existence.


--
Cindy Winegarden
(e-mail address removed)


VFP OLE DB: http://msdn2.microsoft.com/en-us/vfoxpro/bb190232.aspx
VFP ODBC: http://msdn2.microsoft.com/en-us/vfoxpro/bb190233.aspx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top