Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <ButtonConstants.au3>
- #include <EditConstants.au3>
- #include <GUIConstantsEx.au3>
- #include <StaticConstants.au3>
- #include <WindowsConstants.au3>
- #Region ### START Koda GUI section ### Form=
- $Form = GUICreate("Login Form", 286, 130, 191, 124)
- GUISetBkColor(0xC0DCC0)
- GUICtrlCreateLabel("Please input the password", 16, 8, 231, 25)
- GUICtrlSetFont(-1, 8, 400, 0, "Segoe Script")
- $Input1 = GUICtrlCreateInput("ddssd",16,40,169,21,BitOR($ES_PASSWORD,$ES_AUTOHSCROLL))
- GUICtrlSetColor(-1, 0x00BFFF)
- $ck = GUICtrlCreateCheckbox("Show", 200, 40, 65, 25)
- GUICtrlSetState($ck, $GUI_FOCUS)
- $Button1 = GUICtrlCreateButton("Login", 16, 80, 73, 33)
- GUICtrlSetFont(-1, 8, 400, 0, "Segoe Script")
- $Button2 = GUICtrlCreateButton("Exit", 112, 80, 73, 33)
- GUICtrlSetFont(-1, 8, 400, 0, "Segoe Script")
- GUISetState(@SW_SHOW)
- #EndRegion ### END Koda GUI section ###
- $DefaultPassChar= GUICtrlSendMsg($Input1,$EM_GETPASSWORDCHAR,0,0)
- While 1
- $nMsg = GUIGetMsg()
- Switch $nMsg
- Case $Button2, -3
- Exit
- Case $Button1
- dangnhap($Input1, 1810)
- Case $ck
- Switch GUICtrlRead($ck)
- Case 1
- GUICtrlSendMsg($Input1, $EM_SETPASSWORDCHAR, 0, 0)
- Case 4
- GUICtrlSendMsg($Input1, $EM_SETPASSWORDCHAR, $DefaultPassChar, 0)
- EndSwitch
- GUICtrlSetState($Input1, $GUI_FOCUS)
- GUICtrlSetState($ck, $GUI_FOCUS)
- EndSwitch
- WEnd
- Func dangnhap($Input,$pass)
- $Inputpass=GUICtrlRead($Input)
- If $Inputpass = $pass Then
- MsgBox(0,"","Hello")
- Else
- MsgBox(0,"", "Please check the password")
- EndIf
- EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement