abiteric Posted October 13, 2010 Posted October 13, 2010 #include <GUIConstants.au3> $Form1 = GUICreate("TEST",300,300,300,300) $btn_test = GUICtrlCreateButton("Change Form1 Size", 100, 100, 130, 25, 0) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $btn_test GUICtrlSetPos($form1,2,2,200,200) MsgBox(0,@error,@extended) Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd as the code , no error but not work ... somebody whould tell me how to change Form1 size ? very appreciate My website about Y-mate 網拍輔助程式 : http://www.L2play.comMy Blog ( Tranditional Chinese ) 開發小組的部落格 : http://tw.myblog.yahoo.com/play19990909
Mison Posted October 13, 2010 Posted October 13, 2010 Use WinMove(): #include <GUIConstants.au3> $Form1 = GUICreate("TEST",300,300,300,300) $btn_test = GUICtrlCreateButton("Change Form1 Size", 100, 100, 130, 25, 0) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $btn_test WinMove($Form1,2,2,200,200) MsgBox(0,@error,@extended) Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Hi ;)
abiteric Posted October 13, 2010 Author Posted October 13, 2010 (edited) but all gui object move and change size @@?runWinMove($Form1,"",1,1,1000,655) Edited October 13, 2010 by abiteric My website about Y-mate 網拍輔助程式 : http://www.L2play.comMy Blog ( Tranditional Chinese ) 開發小組的部落格 : http://tw.myblog.yahoo.com/play19990909
Mat Posted October 13, 2010 Posted October 13, 2010 Use WinMove(): #include <GUIConstants.au3> $Form1 = GUICreate("TEST",300,300,300,300) $btn_test = GUICtrlCreateButton("Change Form1 Size", 100, 100, 130, 25, 0) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $btn_test WinMove($Form1,2,2,200,200) MsgBox(0,@error,@extended) Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd WinMove needs the second parameter for text... try: WinMove($Form1, "", 2, 2, 200, 200) AutoIt Project Listing
abiteric Posted October 13, 2010 Author Posted October 13, 2010 Thanks Mison and Mat,but winMove ... ( i don`t know how to say by English, please see the 3F image) My website about Y-mate 網拍輔助程式 : http://www.L2play.comMy Blog ( Tranditional Chinese ) 開發小組的部落格 : http://tw.myblog.yahoo.com/play19990909
Mison Posted October 13, 2010 Posted October 13, 2010 What happen if you resize the window by the mouse? Does it behaves differently? Hi ;)
abiteric Posted October 13, 2010 Author Posted October 13, 2010 guictrl object move, and not in the correct location.i want like thisnot this My website about Y-mate 網拍輔助程式 : http://www.L2play.comMy Blog ( Tranditional Chinese ) 開發小組的部落格 : http://tw.myblog.yahoo.com/play19990909
trung0407 Posted October 13, 2010 Posted October 13, 2010 set the size of the control relative to the main window ie as soon as main window changes its size, change the size of the controls as well
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