Solved

Add a reminder when hitting the shutdown button

Posted on 2000-02-28
4
213 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 50 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
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 utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

739 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