ฟอรั่ม PSsix

Would you like to react to this message? Create an account in a few clicks or log in to continue.

ฟอรั่มของบล็อก http://pssix.blogspot.com


    เราจะปิดหน้าต่าง login ได้ยังไงคับ

    avatar
    tumaun
    มือใหม่เพิ่งสมัคร
    มือใหม่เพิ่งสมัคร


    เราจะปิดหน้าต่าง login  ได้ยังไงคับ Empty
    จำนวนข้อความ : 1
    ความนิยม : 0
    เข้าร่วมเมื่อ : 15/10/2015

    เราจะปิดหน้าต่าง login  ได้ยังไงคับ Empty เราจะปิดหน้าต่าง login ได้ยังไงคับ

    ตั้งหัวข้อ by tumaun 21/10/15, 03:03 pm

    อยากปิดหน้าต่าง login
    เมื่อเราใส่ไอดีและพาสแล้ว ให้หน้าต่างมันหายไปอ่ะคับ

    #include
    #include
    #include
    #include
    #include

    _Singleton(@ScriptName, 0)
    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Login", 195, 116, -1, -1)
    $Label3 = GUICtrlCreateLabel("กรุณาใส่ User และ Pass",42, 5, 150, 21)
    $UsernameEdit = GUICtrlCreateInput("", 38, 30, 150, 21, $GUI_SS_DEFAULT_INPUT)
    $PasswordEdit = GUICtrlCreateInput("", 38, 60, 150, 21, BitOR($GUI_SS_DEFAULT_INPUT, $ES_PASSWORD))
    $ButtonOk = GUICtrlCreateButton("&OK", 55, 88, 65, 25, $BS_NOTIFY)
    $ButtonCancel = GUICtrlCreateButton("&Cancel", 125, 88, 65, 25, $BS_NOTIFY)
    #EndRegion ### END Koda GUI section ###
    Global $onoff = 0
    GUISetState()

    While 1
    Switch GUIGetMsg()
    Case $GUI_EVENT_CLOSE
    Exit
    Case $ButtonCancel
    $verify = MsgBox(0, "EXIT", " ปิดโปรแกรม")
    Exit
    Case $ButtonOk
    check()
    EndSwitch
    WEnd

    Func check()
    If GUICtrlRead($UsernameEdit) = "a" And GUICtrlRead($PasswordEdit) = "a" Then
    start()
    ElseIf GUICtrlRead($UsernameEdit) = "abc" And GUICtrlRead($PasswordEdit) = "123" Then
    start()
    ElseIf GUICtrlRead($UsernameEdit) = "def" And GUICtrlRead($PasswordEdit) = "456" Then
    start()
    Else
    $verify = MsgBox(4, "Login ", " ตวรวจสอบ user pass ")
    EndIf
    EndFunc

    Func Start()
    If $onoff = 0 Then
    $onoff = 1
    Run("C:\Program Files (x86)\Google\Chrome\Application\chrome.exe")
    EndIf
    EndFunc

      เวลาขณะนี้ 28/03/24, 07:01 pm