This is another reason why MS should have some easily accessible examples for doing this type of stuff - you would like to use both products together -something which I would imagine will not be an uncommon occurence for others too.
If the vfp exe code has no visual interface then you should be able to easily structure your code into a class and methods. Your class must have the OLEPUBLIC keyword. Now compile it to a vfp mtdll. You will now need to add a reference to it in VS.NET or, alternatively, run TLBIMP(freely available) over it. Here's some C# ASP.NET code that will call it:
< % @Page Language="C#" ASPCompat="true"
< % @Import Namespace="avfpdemo2_dotnetproxy"
< %
server x ;
x = new server() ;
try
{
Response.Write(x.main());
}
catch(Exception ex)
{
Response.Write("Caught .NET exception, source: " + ex.Source + " message: " + ex.Message);
}
>Hi,
>
>I have a ready made VFP application, we are converting the application to C# but we still need a lot of time to convert every thing/
>
>Is there any posiblety to call an EXE form or any by C# Code. can C# use vfp cursor or tables and my last question can we move a veribles betwwen both Languages
>
>
>Best Regards