Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Trap Windows Startup & Shutdown?
Message
De
19/03/2002 11:10:08
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00634451
Message ID:
00634486
Vues:
19
George,

>>George,
>>
>>Do you know if it's possible to trap the Windows Shutdown event and insert a VFP-based EXE at that spot? What I want to do is trap for the event and write an entry into a table.
>>
>>Thanks!
>
>DD,
>
>Startup is easy. Just add a shortcut to the Start Menu or the Windows\Run key under HKEY_CURRENT_USER.
>
>Shut down is harder. VFP has limited abilities in sinking an event. In fact, I've never tried to do it. However, rather than going that route, my first inclination would be to look at ON SHUTDOWN or an SDI form's QueryUnload Event. I've never tested to see if the former fires in response to the Windows shut down messages. The latter should, but again, I haven't tested.


Hmm.. I suppose I don't really even care if I run a VFP program. ALl I need to do is generate a text entry that contains the time of shutdown and perhaps who was logged on at the time. I could get that info and read it into a file next time the computer starts.

Well, thanks. I'll go dig around on the Microsoft site.....
Best,


DD

A man is no fool who gives up that which he cannot keep for that which he cannot lose.
Everything I don't understand must be easy!
The difficulty of any task is measured by the capacity of the agent performing the work.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform