>>>>>>>After compiling mytest.cs without an error, I run mytest.exe but nothing happens. Am supposed to see a window with a message? What am I doing wrong?
>>>>>>
>>>>>>No it's working there from command window:) Check temp folder. It should have created test.txt with "Hello from C#" in it.
>>>>>>Problem it fails if called from VFP via ShellExecute().
>>>>>>Cetin
>>>>>
>>>>>yes, you are correct. the file test.txt has been successfully created. Now, after I figure out how to run this .exe in ShellExecute in VFP, I will let you know what happens here.
>>>>
>>>>OK. Here is test code (assuming exe is c:\temp\test.exe):
>>>>
>>>>
>>>>DECLARE INTEGER ShellExecute IN shell32.dll ;
>>>> INTEGER hwnd, ;
>>>> STRING operation, ;
>>>> STRING file, ;
>>>> STRING params, ;
>>>> STRING workdir, ;
>>>> INTEGER showcmd
>>>>
>>>>? ShellExecute(0,"Open","c:\temp\test.exe",0,0,1)
>>>>
Hope you get something over 32 as return value.
>>>>Cetin
>>>
>>>I just sent you a message. And my code looks almost exactly as yours. And it works on my PC.
>>>
>>>Could it be that your PC is tired? <g> (given the late hour of your time)
>>
>>Might be but it's not on this PC. On this one I don't have 2.0 yet and no VFP.
>>Cetin
>
>The return value I get from SH is 42, now I know what you mean by 32.
Dmitry,
Thank you very much for testing. Is it .Net 2.0? Now I have to find why it doesn't let me execute on my development box.
Cetin