Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP 6.0 Showing in Taskbar
Message
De
27/09/1999 17:38:43
 
 
À
27/09/1999 17:22:51
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00269652
Message ID:
00269662
Vues:
20
>Hi,
>
>I have a small VFP6 App that does some database maintainence that I would like to run concurrently with my main VFP6 app. But I would like it to run in the background and not be shown on the Taskbar if possible. This is a VFP app with which the user has no interaction.
>
>Basically I want to run two copies of VFP runtime while displaying only one on the Taskbar.
>
>Does anyone know if there is a way to do this ?

Yes - embed a CONFIG.FPW in the second app with SCREEN = OFF and never do a _SCREEN.Show() or _SCREEN.Visible = .t.; however, you'll have a great deal of difficulty cleanly stopping the app (or knowing if it hung with an error), since the only access tot he application if it needs to be checked or stopped is via Task manager, and the shutdown of a VFP app running hidden will never be clean (it'll end up doing a TerminateProcess(), which can leave data files in damaged states with data left in buffers buffers, and can also definitely leave any DLLs it references in an inconsistent state. See the MSDN Platform SDK docs on TerminateProcess for the gory details.

>
>Is this a bad idea ?

IMO, yes, if there's any chance that the application might hang or that someone might try restarting Windows while unaware that the second app was running.

I'd strongly recommend that you change the caption and run the second instance minimized, giving the user and VFP's Event processing a chance to know that something is still running before they try to shut down Windows. A hidden VFP app won't identify itself during shutdown, and your user will be confronted with something that "didn't respond" during Windows shutdown.
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform