Sign in to follow this  
Followers 0
John117

how to resize the height of an open gui

4 posts in this topic

Is there a way to resize an open gui? I do not want the user to be able to do it. -just in the coding

Thanks,

David

Share this post


Link to post
Share on other sites



WinMove()

Share this post


Link to post
Share on other sites

&%&*% I thought that only moved it around :) -thanks

Share this post


Link to post
Share on other sites

#include <GuiConstants.au3>

$gui = GuiCreate("MyGUI", 430, 316,-1, -1)
$button2 = GUICtrlCreateButton("Change name",230,275,100,30)
GUICtrlSetResizing(-1,$GUI_DOCKTOP+$GUI_DOCKSIZE+$GUI_DOCKLEFT)
$button3 = GUICtrlCreateButton("\/",110,275,100,30)
GUICtrlSetResizing(-1,$GUI_DOCKTOP+$GUI_DOCKSIZE+$GUI_DOCKLEFT)
$button = GUICtrlCreateButton("/\",110,275,100,30)
GUICtrlSetResizing(-1,$GUI_DOCKTOP+$GUI_DOCKSIZE+$GUI_DOCKLEFT)
GUICtrlSetState(-1,$GUI_HIDE)
GUICtrlCreateEdit("",10,10,410,256)
GUICtrlSetResizing(-1,$GUI_DOCKTOP+$GUI_DOCKSIZE+$GUI_DOCKLEFT)

GuiSetState()
While 1 
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case $msg = $button
        $wpm = WinGetPos($gui)
        WinMove($gui,"",$wpm[0],$wpm[1],$wpm[2],$wpm[3]-100)
        GUICtrlSetState($button3,$GUI_SHOW)
        GUICtrlSetState($button,$GUI_HIDE)
    Case $msg = $button2
        $asd2 = Wingettitle($gui,"")
        WinSetTitle($gui,"",$asd2+1)
    Case $msg = $button3
        $wpm = WinGetPos($gui)
        WinMove($gui,"",$wpm[0],$wpm[1],$wpm[2],$wpm[3]+100)
        GUICtrlSetState($button,$GUI_SHOW)
        GUICtrlSetState($button3,$GUI_HIDE)
    Case Else
        ;;;
    EndSelect
WEnd
Exit

Little script :)


[quote name='dbzfanatic' post='609696' date='Nov 26 2008, 08:46 AM']This is a help forum not a "write this for me" forum.[/quote](Sorry for bad English) :)

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0