Jump to content

help in GUI


Recommended Posts

this is my script:

Global Const $ES_NUMBER = 8192
Global Const $ES_RIGHT = 2
Global Const $ES_LEFT = 0
Global Const $ES_CENTER = 1
Global Const $ES_AUTOHSCROLL = 128
Global Const $ES_READONLY = 2048
Global Const $WS_CAPTION = 0x00C00000
Global Const $WS_SYSMENU = 0x00080000
Global Const $WS_EX_LAYOUTRTL = 0x400000
Global Const $GUI_FOCUS = 256
Global Const $GUI_NOFOCUS = 8192
Global Const $GUI_ENABLE = 64
Global Const $GUI_DISABLE = 128
Global Const $GUI_EVENT_CLOSE = -3
Global Const $GUI_DEFBUTTON = 512
Global Const $CBS_DROPDOWNLIST = 0x3
Global Const $SS_CENTER = 0x1

    GUICreate ("gui", 300, 300, -1, -1, BitOR ($WS_CAPTION, $WS_SYSMENU))
    GUICtrlCreateLabel("bla bla", 5, 10, 290, 40,$SS_CENTER)
    $username = GUICtrlCreateInput("", 10, 30, 180, 20)
    $sendusername = GUICtrlCreateButton("import", 200, 30, 90, 20)
    GUICtrlSetState($sendusername,$GUI_DEFBUTTON)       
    GUICtrlCreateLabel("name:", 10, 60, 100, 40)
    $name = GUICtrlCreateInput("", 110, 55, 180, 20)    
    GUICtrlCreateLabel("phone number:", 10, 85, 100, 40)
    $phonenumber = GUICtrlCreateInput("", 110, 80, 180, 20)
    GUICtrlCreateLabel("OS:", 10, 110, 100, 40)
    $useros = GUICtrlCreateCombo("", 110, 105, 180, 20,$CBS_DROPDOWNLIST)
    GUICtrlSetData($useros, "|Windows 7|Windows Vista|Windows XP|", "Windows XP")   
    GUICtrlCreateLabel("bla bla", 10, 135, 280, 40,$SS_CENTER)
    GUICtrlCreateLabel("serial:", 10, 170, 100, 40)
    $DriveSerial = GUICtrlCreateInput("", 110, 165, 180, 20, $ES_NUMBER)
    GUICtrlCreateLabel("key:", 10, 195, 100, 40)
    $Serialkey = GUICtrlCreateInput("", 110, 190, 180, 20, $ES_NUMBER)
    $userinstallergui = GUICtrlCreateLabel ("mode: ",10,220,70,15)
    $userinstaller = GUICtrlCreateCombo("", 110, 215, 180, 20,$CBS_DROPDOWNLIST)
    GUICtrlSetData($userinstaller, "|1|2|3|4|5|6|7|8|9|", "")   
    $cancel_btn = GUICtrlCreateButton("close", 200, 250, 90, 20)
    $create_code_btn = GUICtrlCreateButton("create", 110, 250, 90, 20)
    $ok_btn = GUICtrlCreateButton("send", 10, 275, 280, 20)
    GUICtrlSetState($create_code_btn,$GUI_DISABLE)
    GUICtrlSetState($ok_btn,$GUI_DISABLE)
    GUISetState()
    
While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $sendusername
            sleep (100)
        Case $create_code_btn
            sleep (100)
        Case $ok_btn
            sleep (100)
        Case $GUI_EVENT_CLOSE
                Exit        
        Case $cancel_btn
        Exit
    EndSwitch
WEnd

why the $username input cannot be selected.

if i try click in this input is not selected.

thanks for your help.

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...