User-friendly System Shut Down Without The WMI

Category:
System/API
Type:
Snippets
Difficulty:
Intermediate
Author:
Anonymous

Version Compatibility: Visual Basic 6

More information:
The following function and sub procedure is a more user-friendly way to shut down your computer. Previous code submissions have used the WMI to execute this. This code implements a Lib "Shell32" function to accomplish the same.

Instructions: Copy the declarations and code below and paste directly into your VB project.

Declarations:

Code: