Jump to content

how to change Form1 size


 Share

Recommended Posts

#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

Link to comment
Share on other sites

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 ;)

Link to comment
Share on other sites

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)
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...