Jump to content
Sign in to follow this  
AndreyS

How to completely disable minimize and maximize windows?

Recommended Posts

AndreyS
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?

Share this post


Link to post
Share on other sites
FireFox

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.
  • Like 1

 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites
AndreyS
Oooh! It turns out there is a special standard function! 
I'm sorry I did not find it right away! :(
Thank you, FireFox! :)
 
The issue resolved!

Share this post


Link to post
Share on other sites
FireFox

I'm sorry I did not find it right away! :(

I made it myself I don't think it was on the forum, so no excuses :)

 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites
AndreyS
Yes, not on the forum! In a help did not know that there is such a function. :)
 
Thank you again! The truth is still full of other questions! )))

Share this post


Link to post
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
Sign in to follow this  

×