Link to home
Start Free TrialLog in
Avatar of srutter
srutter

asked on

Add a reminder when hitting the shutdown button

I'm trying to set a reminder to the my staff before they shut down there Pc to do there time sheets . And I'm wanting to have it connected to the shutdown key can you help??
Avatar of fibdev
fibdev

Well,

One way you could do this is create a exe and have it run hidden when windows starts and add this to the exe's queryunload procedure.

Sub Form1_QueryUnload()

  msgbox "Don't forget your time sheet!", vbExclamation, "Friendly Reminder"

End Sub

If you would like to use this approch.  I'd be happy to create the exe for you.

I could create a standalone that does this using delphi, that way the run-time files that vb needs won't be needed.  This would simplify the installation on all the workstations and reduce file size.

ASKER CERTIFIED SOLUTION
Avatar of wsh2
wsh2

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I have created an application to fill in time sheets. The application itself is launched automatically during startup of the PC and refuses to quit if todays' information hasn't been entered.
If you like I can send you parts of the source code dealing with checking for valid information and refusing to quit.
To be honest.. grabbing this information at Startup is a much better approach. Well done, Rudiger.. <smile>. The shutdown means is too easily defeated by just turning the computer power off.. <sigh>.