Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Add a reminder when hitting the shutdown button

Posted on 2000-02-28
4
Medium Priority
?
216 Views
Last Modified: 2010-05-02
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??
0
Comment
Question by:srutter
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 3

Expert Comment

by:fibdev
ID: 2566499
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.

0
 
LVL 14

Accepted Solution

by:
wsh2 earned 150 total points
ID: 2566507
Option Explicit

Private Sub Form_Load()
    Me.Hide
End Sub

Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
    If UnloadMode = vbAppWindows _
    Then
        Dim intReturn As Integer
        intReturn = MsgBox("Is Your Timesheet Done?", vbYesNo)
        If intReturn = vbNo _
        Then
            Cancel = 1
        End If
    End If
End Sub

0
 

Expert Comment

by:rudiger
ID: 2566803
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.
0
 
LVL 14

Expert Comment

by:wsh2
ID: 2566855
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>.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses

597 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question