>>>>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)
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham