Jump to content

How to completely disable minimize and maximize windows?


AndreyS
 Share

Recommended Posts

Need to deny the ability minimize the window and resize.
I only found this way:
 
GUICreate ("Control Panel", 1024, 720, -1, -1, -1, $ WS_EX_TOOLWINDOW)
But still, you can open the window to full screen and minimize the context menu.
 
How to prevent such a possibility, and from the context menu?
Link to comment
Share on other sites

Hi,

Something like this I guess :

#include <WindowsConstants.au3>
#include <GUIConstantsEx.au3>
#include <GUIMenu.au3>

Local $hGUI = GUICreate("Control Panel", 1024, 720, -1, -1, -1, $WS_EX_TOOLWINDOW)

Local $hSysMenu = _GUICtrlMenu_GetSystemMenu($hGUI)
_GUICtrlMenu_DeleteMenu($hSysMenu, $SC_MINIMIZE, False)
_GUICtrlMenu_DeleteMenu($hSysMenu, $SC_MAXIMIZE, False)

GUISetState(@SW_SHOW, $hGUI)

While GUIGetMsg() <> $GUI_EVENT_CLOSE
Sleep(10)
WEnd
Br, FireFox.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...