Const SC_CLOSE As Long = &HF060
Const SC_MOVE As Long = &HF010
Const SC_RESTORE As Long = &HF120
Const SC_SEPARATOR As Long = &HF00F
Const SC_SIZE As Long = &HF000
Const SC_MAXIMIZE As Long = &HF030
Const MF_BYCOMMAND As Long = &H0&
Dim lngHandle As Long
lngHandle = GetSystemMenu(FindWindowA("XLMAIN", Application.Caption), False)
Call DeleteMenu(lngHandle, SC_CLOSE, MF_BYCOMMAND)
Call DeleteMenu(lngHandle, SC_MOVE, MF_BYCOMMAND)
Call DeleteMenu(lngHandle, SC_RESTORE, MF_BYCOMMAND)
Call DeleteMenu(lngHandle, SC_SEPARATOR, MF_BYCOMMAND)
Call DeleteMenu(lngHandle, SC_SIZE, MF_BYCOMMAND)
Call DeleteMenu(lngHandle, SC_MAXIMIZE, MF_BYCOMMAND)
|