Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP 9 Service app
Message
 
 
To
11/05/2021 12:55:08
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01680208
Message ID:
01680310
Views:
41
>>How do you force VFP exe to behave like a console app?
>>And, when you created the C# application, did you use the console app?
>
>Yes, C# as a console app.
>
>A lot of what I use for VFP console apps (batch programs) I learned from Rick Strahl
>Thanks Rick!
>
>I attached three files:
>ConsoleLog.prg
>MakeConsole.bat
>Readme.txt
>
>After you compile your VFP app
>Run MakeConsole.bat to convert the exe to a console app.
>
>For VFP:
>Config.fpw as follows
>SCREEN=OFF
>DELETED=ON
>SAFETY=OFF
>RESOURCE=OFF
>
>In your main prg:
>SYS(2335, 0) && Unattended Server Mode
>PRIVATE Console
>Console = ConsoleLog() && Create Console once in your main
>Console.Log("Starting VTC_GPS") && Console.log("Your String") will write to the console AND the log file
>
>&& Console.log() is your friend - these apps run unattended and invisible in the task scheduler
>&& Almost impossible to log too much
>
>&& Wrap your main prg in a try/catch and Log any errors
>&& and send yourself an email with the log file if you can
>
>&& Good Luck!

Michael,

Thank you very much!
"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
Previous
Reply
Map
View

Click here to load this message in the networking platform