Datenshi Posted July 31, 2009 Share Posted July 31, 2009 (edited) How is it that a GUICreate("TESTING", 185, 340) is bigger then after a resize with WinMove($GUI,default,default,default,185, 340)?In this case there's a loss of Width: 6 and Height: 32Here's a script to test:#include <GUIConstantsEx.au3> $GUI = GUICreate("TESTING", 185, 340) $go = GUICtrlCreateButton("Resize", 8, 177, 90, 17) GUISetState() While 1 $nmsg = guigetmsg() switch $nmsg case $Go $SizeReturns = WinGetClientSize($GUI) MsgBox(0,"","Width: "&$SizeReturns[0]&@CRLF&"Height: "&$SizeReturns[1]&@CRLF&"..Now moving window to same position..press OK") WinMove($GUI,default,default,default,185, 340) $SizeReturns = WinGetClientSize($GUI) MsgBox(0,"","Width: "&$SizeReturns[0]&@CRLF&"Height: "&$SizeReturns[1]) case $GUI_EVENT_CLOSE Exit EndSwitch WendUpdate; I think i figured this one out by myself, seems Winmove doesn't take the Title bar into consideration when resizing.For the default XP theme, Width: +6 and Height: +32 is needed to compensate..Its another value for the classic themes. Edited July 31, 2009 by Datenshi RapidQueuer 2.4 - For Rapidshare.comOpensubtitles Hashing FuncRevision3 PlayerGTPlayer BetaIMDB & Poster Grabber v1.3Fetgrek.com - My Website Link to comment Share on other sites More sharing options...
Zedna Posted July 31, 2009 Share Posted July 31, 2009 (edited) Yes. Width,Height in GUICreate() is meant for client area not for whole window size.WinMove() uses whole window's size.In latest Autoit beta this is explicitly described in helpfile at GUICreate()Here is related tickethttp://www.autoitscript.com/trac/autoit/ticket/777 Edited July 31, 2009 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search 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