Disable and Enable the X button on a form

Category:
Forms and Controls
Type:
Snippets
Difficulty:
Intermediate
Author:
Scott Seligman

Version Compatibility: Visual Basic 5

More information:
This routine allows you to disable and re-enable the 'X' in the top corner of any form. Usage should be self-explanatory.

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

Declarations:

Code: