Does anyone know how to run a Visual Basic Prg or a C++ or C#.net from a VFP program.
This is a extension of the .TLB post I posted, I thought this might be a better approach.
There is not much more to say than in thread184-1706652
You have a DLL, you are advised to create a TLB file, which is short for typelib, that is describing the OLE classes and their methods and also included in the DLL. You don't need the TLB, as you don't link any DLL in VFP, you keep it a seperate file and once it is registered it would show up in a list of OLE classes in object browser. The vendor of the DLL should know how it's internal classes are named.
And then you use it like any COM/OLA class, via obj = CREATEOBJECT("class.name") and then calling obj.method(), whatever methods the class offers.
In C++ you typically don't create OLE classes, but functions, which can be declared in VFP via DECLARE function IN some.dll, but the TLB part of your requests suggests, this is not the case with your DLL.
If a C# assembly is not made COM visible, then you can't use it in VFP directly via any of these ways.
Thanks for jumping in, I really was tring to ask if I built a VB program using the dll the way they show.
Can I run that VB prg from inside of my VFP prg.
That surely is possible. You would need to create ole classes, at least one, you can use IN VFP, then we're at my first Answer again.
In VB.Net you create an assembly and at least in project settings check "Make assembly COM-Visible", you'll need to attribute classes and methods public to be available in VFP. You'll find much info about how to do that from Rick Strahl at West-Wind.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.