RobertKipling Posted November 1, 2007 Posted November 1, 2007 Whenever I size a text box to the size of the window to be auto-resized later, why must I define two heights (one for Windows XP and one for XP classic and older OSes) ? If @OSVersion = "WIN_XP" Then $txtMain = GUICtrlCreateEdit("",1,1,400,293) Else $txtMain = GUICtrlCreateEdit("",1,1,400,300) EndIf This is what I have to do with the code; of course, if someone is using Windows XP classic mode, then the window appears improperly. What can I do to ensure that the text box is always the same size as the inside of the window?
Zedna Posted November 1, 2007 Posted November 1, 2007 Use WinGetClientSize()Look here Resources UDF ResourcesEx UDF AutoIt Forum Search
GaryFrost Posted November 1, 2007 Posted November 1, 2007 might look at GUIResizeMode option and GUICtrlSetResizing SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
RobertKipling Posted November 6, 2007 Author Posted November 6, 2007 Thank you, this works! I finally figured this out, can't wait to implement it now. (I've never actually seen this before, and I've been through two versions of VB before I found AutoIt...) #include <GUIConstants.au3> $gui = GUICreate("my gui",400,300) $size = WinGetClientSize($gui) $label = GUICtrlCreateEdit("",0,0,$size[0],$size[1]) GUISetState() While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then Exit WEnd
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