SYRAU3 Posted June 27, 2012 Share Posted June 27, 2012 Hello big-minds... too many questions i'm sorry i have this simple form: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 345, 368, 192, 146, BitOR($WS_SIZEBOX,$WS_THICKFRAME,$WS_SYSMENU,$WS_POPUP)) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd i need to make the window unresizable keeping the same style, is that possible? Link to comment Share on other sites More sharing options...
BrewManNH Posted June 27, 2012 Share Posted June 27, 2012 You want to make the window not able to be resized, yet you included 2 style settings that do just that? Who wrote this for you?Remove the $WS_SIZEBOX,$WS_THICKFRAME style settings from the GUICreate line and that should do it. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
JohnQSmith Posted June 27, 2012 Share Posted June 27, 2012 Remove the $WS_SIZEBOX and the $WS_THICKFRAME. Both of those switches allow resizing. Whenever someone says "pls" because it's shorter than "please", I say "no" because it's shorter than "yes". Link to comment Share on other sites More sharing options...
SYRAU3 Posted June 27, 2012 Author Share Posted June 27, 2012 Hey guys i know what i'm doing!, you didn't get my idea, i want to keep this window style:but make the window (not able to be resized ).. is that possible? Link to comment Share on other sites More sharing options...
AZJIO Posted June 27, 2012 Share Posted June 27, 2012 #include <WindowsConstants.au3> $Form1 = GUICreate("Form1", 345, 368, -1, -1, BitOR($WS_POPUP, $WS_SYSMENU), BitOR($WS_EX_DLGMODALFRAME, $WS_EX_CONTROLPARENT)) GUISetState() While 1 Switch GUIGetMsg() Case -3 Exit EndSwitch WEnd My other projects or all Link to comment Share on other sites More sharing options...
SYRAU3 Posted June 27, 2012 Author Share Posted June 27, 2012 thank you AZJIO, but the style is DEAD now! Link to comment Share on other sites More sharing options...
UEZ Posted June 27, 2012 Share Posted June 27, 2012 (edited) Try this: expandcollapse popup#include <WinAPI.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Global Const $SC_DRAGMOVE = 0xF012 Global Const $iW = 345 Global Const $iH = 368 Global Const $hGUI = GUICreate("Unresizable Thickframe Window", $iW, $iH, -1, -1, BitOR($WS_SIZEBOX, $WS_THICKFRAME, $WS_SYSMENU, $WS_POPUP)) GUISetState(@SW_SHOW) Global Const $iWFrame = _WinAPI_GetSystemMetrics(32) * 2 - 2 Global Const $iHFrame = _WinAPI_GetSystemMetrics(33) * 2 - 2 GUIRegisterMsg($WM_SIZING, "WM_SIZING") GUIRegisterMsg($WM_LBUTTONDOWN, "WM_LBUTTONDOWN") While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE GUIRegisterMsg($WM_SIZING, "") GUIRegisterMsg($WM_LBUTTONDOWN, "") GUIDelete() Exit EndSwitch WEnd Func WM_SIZING($hWnd, $iMsg, $wParam, $lParam) Local $sRect = DllStructCreate("Int[4]", $lParam) Local $left = DllStructGetData($sRect, 1, 1) Local $top = DllStructGetData($sRect, 1, 2) Local $right = DllStructGetData($sRect, 1, 3) Local $bottom = DllStructGetData($sRect, 1, 4) Local $aWinPos = WinGetPos($hWnd) Switch $wParam Case 1 ;left DllStructSetData($sRect, 1, $aWinPos[0], 1) Case 2 ;right DllStructSetData($sRect, 1, $aWinPos[0] + $iW + $iWFrame, 3) Case 3 ;top DllStructSetData($sRect, 1, $aWinPos[1], 2) Case 6 ;buttom DllStructSetData($sRect, 1, $aWinPos[1] + $iH + $iHFrame, 4) Case 4 ;left upper corner DllStructSetData($sRect, 1, $aWinPos[0], 1) DllStructSetData($sRect, 1, $aWinPos[1], 2) Case 5 ;right upper corner DllStructSetData($sRect, 1, $aWinPos[1], 2) DllStructSetData($sRect, 1, $aWinPos[0] + $iW + $iWFrame, 3) Case 7 ;left buttom corner DllStructSetData($sRect, 1, $aWinPos[0], 1) DllStructSetData($sRect, 1, $aWinPos[1] + $iH + $iHFrame, 4) Case 8 ;right buttom corner DllStructSetData($sRect, 1, $aWinPos[0] + $iW + $iWFrame, 3) DllStructSetData($sRect, 1, $aWinPos[1] + $iH + $iHFrame, 4) EndSwitch Return "GUI_RUNDEFMSG" EndFunc ;==>WM_SIZING Func WM_LBUTTONDOWN($hWnd, $iMsg, $wParam, $lParam) _SendMessage($hGUI, $WM_SYSCOMMAND, $SC_DRAGMOVE, 0) EndFunc ;==>_WM_LBUTTONDOWN Br, UEZ Edited June 27, 2012 by UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
Venix Posted June 27, 2012 Share Posted June 27, 2012 I was actually looking for something like this myself, thanks UEZ. Link to comment Share on other sites More sharing options...
SYRAU3 Posted June 28, 2012 Author Share Posted June 28, 2012 UEZ................... I LOVE YOU Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now