This sample program demonstrates how to subclass a form using VB5's 
new AddressOf operator.

Specifically, the program adds an Exit icon which you can just double
click to shut down your computer.   Right clicking on the icon will
display a menu from which you can choose to shut down, reboot, or go 
into MS-DOS mode, just the same as if you click Shut Down from the 
Start button.  Kinda of a useful little utility actually.  It only
saves a few mouse clicks and movements, but it's amazing how much
easier it is.

This source code is for VB 5.0 ONLY.  One of the new things you can 
do in VB5 is subclass.  Previous versions of VB required a subclassing
custom control.  VB5 does not.  If you want a VB4 version of this
program, you can download TBEXIT.ZIP from the VB Examples software
library on America Online.  The VB4 version requires the subclassing
control MSGHOO32.OCX and runtime files to support this control.  These
files are included with the VB4 example.

If you do find this to be a more convenient way of exiting Windows, do 
what I did and place a shortcut to the executable in your Startup
folder.

Any questions can be sent to PCC MikeD on America Online.  I hope you 
find this little example helpful.

Mike Davis
Visual Basic Consultant
PC Development Forum
America Online
Keyword: PDV
