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
AI 요약: 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.
소스 코드
' 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
원본 댓글 (3)
Wayback Machine에서 복구됨