Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Writing console programs with VFP
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00398000
Message ID:
00405913
Views:
13
>I compiled your code into a .exe (VFP6/SP4), and:
>
>1. I ran the .exe from CMD and it still opened up a new CMD window (it didn't reuse the current one). Why didn't the original CMD session get used by the .exe?
>

Because the CLI, when launching a WinApp, isn't explicitly connecting a console to the WinApp; the only way a WinApp inherits a console is to have it passed by the parent in the CreateProcess() invocation. It will cause a console to pass for piping purposes

>2. There seemed to be a significant delay between each "hello world" output. I didn't see SLEEP declared anywhere, is VFP just slow at this kind of thing?
>

Did you leave in the 3 carefully-commented INKEY(10) statements? They produced the waits - once at console creation, once after the first WriteConsole, and once after the second WriteConsole. It doesn't stay up very long without them.

>
>Oh, and .3.: THANKS! This is awesome and something I didn't realize you could really do with VFP!
>

Don't applaud - just throw money... :-)
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform