Iose Posted September 6, 2018 Share Posted September 6, 2018 With GUICreate ("Frame", 1270, 600), I set a fixed size of a frame. With GUICreate ("Frame", @DesktopWidth, @DesktopHeight), I set it, according to the size of my desktop. But if you wanted to adapt it dynamically to the size of the window that opens, do you know how to do? Thank u! Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted September 6, 2018 Moderators Share Posted September 6, 2018 Moved to the appropriate forum, as the Developer General Discussion forum very clearly states: Quote General development and scripting discussions. If it's super geeky and you don't know where to put it - it's probably here. Do not create AutoIt-related topics here, use the AutoIt General Help and Support or AutoIt Technical Discussion forums. Moderation Team Iose 1 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Belini Posted September 6, 2018 Share Posted September 6, 2018 (edited) I also needed something like this HERE and I ended up creating my own code, I hope it works for you too. expandcollapse popup; ========================================= ; Autoit3 3.3.9.4 ; Date: 10/12/17 ; Autor: Belini ; Function: Resize Gui to other resolutions ; ========================================= ; Use "W" for horizontal coordinate or length ; Use "H" for vertical coordinate or height ; Use "F" for font size $Res_W_Original = 1440; Informs here the horizontal resolution in which the gui was made $Res_H_Original = 900; Informs here the vertical resolution in which the gui was made $Res_W_Current = @DesktopWidth; Desktop Horizontal Resolution $Res_H_Current = @DesktopHeight; Desktop Vertical Resolution #region ### START Koda GUI section ### Form $Form1 = GUICreate("Example Auto Size", Auto_size(446, "W"), Auto_size(476, "H"), -1, -1) $Edit1 = GUICtrlCreateEdit("", Auto_size(8, "W"), Auto_size(8, "H"), Auto_size(433, "W"), Auto_size(385, "H")) GUICtrlSetBkColor(-1, 0x000000) $Group1 = GUICtrlCreateGroup("Command", Auto_size(8, "W"), Auto_size(400, "H"), Auto_size(433, "W"), Auto_size(67, "H")) GUICtrlSetFont(-1, Auto_size(10, "F"), 400, 0, "MS Sans Serif") $Input1 = GUICtrlCreateInput("", Auto_size(16, "W"), Auto_size(423, "H"), Auto_size(337, "W"), Auto_size(29, "H")) $Button1 = GUICtrlCreateButton("Send", Auto_size(356, "W"), Auto_size(424, "H"), Auto_size(75, "W"), Auto_size(30, "H")) GUICtrlSetFont(-1, Auto_size(12, "F"), 400, 0, "MS Sans Serif") GUISetState(@SW_SHOW) #endregion ### END Koda GUI section ### While 1 Switch GUIGetMsg() Case -3 Exit EndSwitch WEnd Func Auto_size($value = 0, $opt = "W") Local $result Switch $opt Case "W" If $value = -1 Then $result = -1 Else $result = $Res_W_Original / $value $result = $Res_W_Current / $result EndIf Case "H" If $value = -1 Then $result = -1 Else $result = $Res_H_Original / $value $result = $Res_H_Current / $result EndIf Case "F" If $value = -1 Then $result = -1 Else $result = $Res_H_Current / $Res_H_Original $result = $value * $result EndIf EndSwitch Return $result EndFunc ;==>Auto_size Edited September 6, 2018 by Belini My Codes: Virtual Key Code UDF: http://www.autoitscript.com/forum/topic/138246-virtual-key-code-udf/ GuiSplashTextOn.au3: http://www.autoitscript.com/forum/topic/143542-guisplashtexton-udf/ Menu versions of Autoit: http://www.autoitscript.com/forum/topic/137435-menu-versions-of-autoit/#entry962011 Selects first folder of letters: ]http://www.autoitscript.com/forum/topic/144780-select-folders-by-letter/#entry1021708/spoiler] List files and folders with long addresses.: http://www.autoitscript.com/forum/topic/144910-list-files-and-folders-with-long-addresses/#entry102 2926 Program JUKEBOX made in Autoit:some functions:http://www.youtube.com/watch?v=WJ2tC2fD5Qs Navigation to search:http://www.youtube.com/watch?v=lblwOFIbgtQ Link to comment Share on other sites More sharing options...
markyrocks Posted September 6, 2018 Share Posted September 6, 2018 (edited) WinGetClientSize ( "title" [, "text"] ) will return the size of a window. winmove()allows for resize options. (Idk why my text has a yellow background...) edit. GUICtrlSetResizing ( controlID, resizing ) has control repositioning and resizing options. Edited September 10, 2018 by JLogan3o13 Spoiler "I Believe array math to be potentially fatal, I may be dying from array math poisoning" Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted September 10, 2018 Moderators Share Posted September 10, 2018 On 9/6/2018 at 1:54 PM, markyrocks said: (Idk why my text has a yellow background...) Not sure why it had to be a 72pt. font either... "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! 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