Jump: Search:

Total Visual SourceBook

Total Visual SourceBook CD and Printed Manual

Microsoft Access 2007/2010 Version
is Shipping!

New features in Total Visual SourceBook for Access, Office 2007 and VB6

Supports Access/Office 2010 (32 bit), 2007, 2003, 2002, 2000, and
Visual Basic 6.0!

Also available for:
Access 97/95


View all FMS products for Microsoft AccessAll Our Microsoft Access Products

SourceBook Info:

Why SourceBook?

 

"The code is exactly how I would like to write code and the algorithms used are very efficient and well-documented."

Van T. Dinh, Microsoft MVP

 

 

 

 

 
Royalty free source code library modules for Microsoft Access, VB6, VBA, OfficeRoyalty free source code library modules for Microsoft Access, VB6, VBA, OfficeVBA and VB6 Source Code Library Download the free trial version of Total Visual SourceBook for Microsoft Access, Office, VB6 and VBA
Category: General VBA/VB6 : Application Techniques
Description: Common application development code for messages boxes, error handling, and shutting down windows

Class: CShutdown

Shutting down Windows with options to restart and logoff

This class allows you to shutdown Windows in one of four ways: - Shutdown - Restart - Logoff - Shutdown with Power Off

Procedure Name

Type

Description

(Declarations) Declarations Declarations and private variables for the CShutdown class
ForceReboot Property Sets whether or not the class forces Windows to reboot regardless of running process status. If this property is set to True, the system does not send the WM_QUERYENDSESSION or WM_ENDSESSION messages to processes. This can result in data loss, and should only be used in an emergency.
ShutdownMode Property Sets the shutdown mode This class supports four types of shutdown modes: Mode Enum Type Description ------------------------------------- Shutdown esmShutdown Shuts down Windows. Logoff esmLogOff Closes all current processes and logs the current user off. After Shtudown is complete, all disk buffers have been flushed to disk, and all processes have been stopped. PowerOff esmPowerOff Same as Shutdown, but also turns the computer power off if the your hardware supports this. Reboot esmReboot Same as Shutdown, but also reboots the computer
AdjustToken Private NT requires that you have SE_SHUTDOWN_NAME privilege. VB apps don't have this by default, so this procedure grants it.
IsNT Private Determines if the OS is Windows NT
MakeFlags Private Builds the flags long integer from class property values.
Shutdown Method Shuts down Windows (according to the mode specified by the ShutdownMode property and the Force property) by calling the ExitWindowsEX API function The ExitWindowsEX function returns as soon as it has been called--all subsequent activity related to the shutdown is then handled asynchronously by Windows. When a shutdown is initiated, all applications are informed that they need to shutdown. If an application does not respond after a specific period of time, Windows displays a dialog allowing you to: - Forcibly shut down the application - Retry the shutdown - Cancel the shutdown If you set the Force property to True, Windows always forces applications to close and does not display the dialog.

Overview of Total Visual SourceBook

The source code in Total Visual SourceBook includes modules and classes for Microsoft Access, Visual Basic 6 (VB6), and Visual Basic for Applications (VBA) developers. Easily add this professionally written, tested, and documented royalty-free code into your applications to simplify your application development efforts.

Additional Resources

Feedback

Contact Us  l   Web questions: Webmaster   l   Copyright © FMS, Inc., Vienna, Virginia
Celebrating our 26th Year of Software Excellence