Program to Auto Shutdown Win95 
Author Message
 Program to Auto Shutdown Win95

Hi,
        Anyone has any codes to automatically shut down Window95 at a
pre-defined time?

        Any help would be greatly appreciated.


Ng Siong Wee



Thu, 01 Feb 2001 03:00:00 GMT  
 Program to Auto Shutdown Win95
Combine two things:

A timer to check for the time, and shutting down Windows. The first is
simple: place a timer on a form, set it's interval to something appropriate
(say 10 seconds) or use the CCRP timer object. The second part has been
answered often before in this group. Check DeJa news or the MS
Knowledgebase.

Andre'

Quote:

>Hi,
>  Anyone has any codes to automatically shut down Window95 at a
>pre-defined time?

> Any help would be greatly appreciated.


>Ng Siong Wee




Thu, 01 Feb 2001 03:00:00 GMT  
 Program to Auto Shutdown Win95

Quote:

> Hi,
>    Anyone has any codes to automatically shut down Window95 at a
> pre-defined time?

Just use the Windows Shutdown API call..

Declare Function ExitWindowsEx Lib "user32" (ByVal uFlags As Long, ByVal
dwReserved As Long) As Long
Const EWX_LOGOFF = 0
Const EWX_SHUTDOWN = 1
Const EWX_REBOOT = 2
Const EWX_FORCE = 4
Const EWX_POWEROFF = 8
Const EWX_RESET = EWX_LOGOFF + EWX_FORCE + EWX_REBOOT

Then just call it like so..

Dim X As Long
X = ExitWindowsEx(EWX_SHUTDOWN, 0)

Create a timer that is called every second /minute (whatever) that gets
the system time. If system time = time to shutdown.... I think you can
guess what is going go here.

Hope that helps.

Regards,

John.
http://members.xoom.com/jamorrison/



Thu, 01 Feb 2001 03:00:00 GMT  
 Program to Auto Shutdown Win95

Thanks for all the answers :)

Rgds
Siong Wee
Ng Siong Wee



Sat, 03 Feb 2001 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Run program at Win95 shutdown

2. Auto Run app at Shutdown

3. Shutdown Win95 on specific day and time?

4. How to Shutdown Win95 and NT 4.0 from VB

5. VB4 applications GPF on shutdown on Win95

6. HOW can i shutdown Win95 from VB4

7. Script to activate win95 shutdown

8. disconnecting shares before shutdown in win95/98

9. Shutdown win95 from vb??

10. Win95 shutdown

11. Making PGM STARUP & SHUTDOWN with WIN95

12. Remote Shutdown Of Win95 Workstation

 

 
Powered by phpBB® Forum Software