Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Trap Windows Startup & Shutdown?
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00634451
Message ID:
00634766
Views:
19
Matthew (or should I call you R? <g>),

>>>
>>>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.....
>
>I don't know why, but my gut reaction is "Use the Registry". Whatever System Information pulls it's current environment info from. Are we talking about Win9x or W2k/XP?

It could be anything between 98-ME so it has to be pretty generic. My 'sense' is that this will have to be done via the API at some point.
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.
Previous
Reply
Map
View

Click here to load this message in the networking platform