pip install pywin32
import win32console, win32gui, win32con
hwnd = win32console.GetConsoleWindow()
if hwnd:
hMenu = win32gui.GetSystemMenu(hwnd, 0)
if hMenu:
win32gui.DeleteMenu(hMenu, win32con.SC_CLOSE, win32con.MF_BYCOMMAND)
Go to list of users who liked
More than 1 year has passed since last update.
pip install pywin32
import win32console, win32gui, win32con
hwnd = win32console.GetConsoleWindow()
if hwnd:
hMenu = win32gui.GetSystemMenu(hwnd, 0)
if hMenu:
win32gui.DeleteMenu(hMenu, win32con.SC_CLOSE, win32con.MF_BYCOMMAND)
Register as a new user and use Qiita more conveniently
Go to list of users who liked