Disable 'X' on Forms (Including MDI Child Forms)
This is shorter way to disable the 'X' or close button on a form. It also works on MDI Child forms also which I have found most other code does not.
AI
Resumo por IA: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.
Código fonte
' Place this in the Form Load event of the form you want to disable the 'X': Dim hSysMenu As Long hSysMenu = GetSystemMenu(hwnd, False) RemoveMenu hSysMenu, SC_CLOSE, MF_BYCOMMAND Upload
Comentários originais (3)
Recuperado do Wayback Machine