
Disable the Standard Window Close (X) Button
This code disables the standard Window Close (X) button on the upper right corner of Windows forms: Private Const SC_CLOSE As Integer = &HF060Private Const MF_GRAYED As Integer = &H1 Private Declare Function GetSystemMenu Lib “user32” (ByVal hwnd As Long, ByVal bRevert As Long) As LongPrivate Declare Function EnableMenuItem Lib