sandin Posted September 19, 2007 Share Posted September 19, 2007 I want to set controls not related to the GUI's size, so when I click on the button in my script's example, I want for button to be below GUI's size and I want for label to stay in that exact position it has now, but button keeps following the GUI's size, and so does the label. #include <GUIConstants.au3> $Form1 = GUICreate("AForm1", 385, 198, 193, 115) $Label1 = GUICtrlCreateLabel("ALabel1", 150, 50, 90, 25) $Button1 = GUICtrlCreateButton("AButton1", 112, 170, 129, 25, 0) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit case $Button1 $pos = WinGetPos("AForm1") WinMove("AForm1", "", $pos[0], $pos[1], $pos[2], $pos[3]-30) EndSwitch WEnd Some cool glass and image menu | WinLIRC remote controler | Happy Holidays to all... | Bounce the sun, a game in which you must save the sun from falling by bouncing it back into the sky | Hook Leadtek WinFast TV Card Remote Control Msges | GDI+ sliding toolbar | MIDI Keyboard (early alpha stage, with lots of bugs to fix) | Alt+Tab replacement | CPU Benchmark with pretty GUI | Ini Editor - Edit/Create your ini files with great ease | Window Manager (take total control of your windows) Pretty GUI! | Pop-Up window from a button | Box slider for toolbar | Display sound volume on desktop | Switch hotkeys with mouse scroll Link to comment Share on other sites More sharing options...
dbzfanatic Posted September 19, 2007 Share Posted September 19, 2007 (edited) #include <GUIConstants.au3> $Form1 = GUICreate("AForm1", 385, 198, 193, 115) $Label1 = GUICtrlCreateLabel("ALabel1", 150, 50, 90, 25) $Button1 = GUICtrlCreateButton("AButton1", 112, 170, 129, 25, 0) GUISetState(@SW_SHOW) GUICtrlSetResizing($Button1,$GUI_DOCKSIZE) GUICtrlSetResizing($Label1,$GUI_DOCKSIZE) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit case $Button1 $pos = WinGetPos("AForm1") WinMove("AForm1", "", $pos[0], $pos[1], $pos[2], $pos[3]-30) EndSwitch WEnd try that,might work Edited September 19, 2007 by dbzfanatic Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote] Link to comment Share on other sites More sharing options...
ResNullius Posted September 19, 2007 Share Posted September 19, 2007 Or do you mean like this: #include <GUIConstants.au3> $Form1 = GUICreate("AForm1", 385, 198, 193, 115) $Label1 = GUICtrlCreateLabel("ALabel1", 150, 50, 90, 25) $Button1 = GUICtrlCreateButton("AButton1", 112, 170, 129, 25, 0) GUISetState(@SW_SHOW) GUICtrlSetResizing($Button1,$GUI_DOCKTOP) GUICtrlSetResizing($Label1,$GUI_DOCKTOP) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit case $Button1 $pos = WinGetPos("AForm1") WinMove("AForm1", "", $pos[0], $pos[1], $pos[2], $pos[3]-30) EndSwitch WEnd Link to comment Share on other sites More sharing options...
sandin Posted September 19, 2007 Author Share Posted September 19, 2007 Or do you mean like this: #include <GUIConstants.au3> $Form1 = GUICreate("AForm1", 385, 198, 193, 115) $Label1 = GUICtrlCreateLabel("ALabel1", 150, 50, 90, 25) $Button1 = GUICtrlCreateButton("AButton1", 112, 170, 129, 25, 0) GUISetState(@SW_SHOW) GUICtrlSetResizing($Button1,$GUI_DOCKTOP) GUICtrlSetResizing($Label1,$GUI_DOCKTOP) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit case $Button1 $pos = WinGetPos("AForm1") WinMove("AForm1", "", $pos[0], $pos[1], $pos[2], $pos[3]-30) EndSwitch WEnd thank you, it works. Some cool glass and image menu | WinLIRC remote controler | Happy Holidays to all... | Bounce the sun, a game in which you must save the sun from falling by bouncing it back into the sky | Hook Leadtek WinFast TV Card Remote Control Msges | GDI+ sliding toolbar | MIDI Keyboard (early alpha stage, with lots of bugs to fix) | Alt+Tab replacement | CPU Benchmark with pretty GUI | Ini Editor - Edit/Create your ini files with great ease | Window Manager (take total control of your windows) Pretty GUI! | Pop-Up window from a button | Box slider for toolbar | Display sound volume on desktop | Switch hotkeys with mouse scroll 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