Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Good reason to never use form methods
Message
From
16/09/2000 10:58:07
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00415216
Message ID:
00417292
Views:
23
>I still hate the DOS box; you can use API_APPRUN to run it minimized, and I've discovered a bit of magic, at least under Win2K; when the DOS app finishes, if Close on Exit is not checked for the DOS PIF default, Win2K prepends the string [Inactive in front of the name of the executable, either the default or the one assigned by the lpTitle parameter if that's used with CreateProcess(). You can use this with FindWindow() to spot when the app completes, and use PostMessage() to send a Ctrl-C or Ctrl-Break to the hWnd of the inactive DOS process - and the DOS box closes without further user interaction. It'll be making its way into the next release of API_APPRUN, due out shortly, along with some other capabilities based on a more complete implementation of the STARTUPINFO structure leveraged off CLSHeap.

That's good news. I've simply included the marking of the window (just catch it off the toolbar while it's active) with CloseOnExit, as a part of testing on first install (and we install through pcAW for most of it, so it's not something we need a full novel of instructions for user to read).

Actually, even with API_APPRUN it still shows up on the taskbar, and (funny, though) the current VFP app's window seems to gain and lose focus - I call PKZip25 in batches of, roughly, 10 files at a time (so I have some control, and a chance to display a progress indicator, count the files which were properly zipped and which were busy at the time etc), and the _screen.caption bar changes color each time a DOS session jumps in and out. I started treating it as another addition to the colorfulness of my apps, and an additional progress indicator - but then, it's happening only under w2k; in NT4 it wasn't so.

The current version of API_APPRUN is perfect enough, and I'm looking forward to the new version.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform