#include #include #include #include #include #include #include Local $hMainGUI = GUICreate("User Account Creation Tool", 400, 600) $hyourlabel = GUICtrlCreateLabel("YOUR INFORMATION", 30, 10, 256) GUICtrlSetFont($hyourlabel, Default, 600) GUISwitch($hMainGUI) ;GUICtrlCreateLabel(left top width height) Local $adminfrejalabel = GUICtrlCreateLabel("USER ID:", 8, 38, 64, 17) Local $adminfrejaid = GUICtrlCreateInput("", 80, 38, 110, 17) Local $adminpasswordlabel = GUICtrlCreateLabel("Password:", 8, 62, 64, 17) Local $adminpassword = GUICtrlCreateInput("", 80, 62, 110, 17, BitOR($ES_PASSWORD, $ES_AUTOHSCROLL)) ;$Checkbox1 = GUICtrlCreateCheckbox("Show password", 200, 62, 100, 16) ;$DefaultPassChar = GUICtrlSendMsg($adminpassword, $EM_GETPASSWORDCHAR, 0, 0) $htypelabel = GUICtrlCreateLabel("TYPE OF USER", 30, 100, 256) GUICtrlSetFont($htypelabel, Default, 600) GUISetState(@SW_SHOW) UserType() Func UserType() Local $regularuser = GUICtrlCreateRadio("Regular User", 8, 120, 110, 17) Local $serviceuser = GUICtrlCreateRadio("Admin User", 8, 140, 110, 17) ;GUICtrlSetState($idRadio2, $GUI_CHECKED) GUISetState(@SW_SHOW) ; will display an dialog box with 1 checkbox Local $idMsg While 1 $idMsg = GUIGetMsg() Select Case $idMsg = $GUI_EVENT_CLOSE Exit Case $idMsg = $regularuser And BitAND(GUICtrlRead($regularuser), $GUI_CHECKED) = $GUI_CHECKED $huserlabel = GUICtrlCreateLabel("USER INFORMATION", 30, 180, 256) GUICtrlSetFont($huserlabel, Default, 600) Local $usernamelabel = GUICtrlCreateLabel("USER ID:", 8, 200, 64, 17) Local $username = GUICtrlCreateInput("", 80, 200, 110, 17) Local $userpasslabel = GUICtrlCreateLabel("Password", 8, 220, 64, 17) Local $userpass = GUICtrlCreateInput("", 80, 220, 110, 17) Local $useridlabel = GUICtrlCreateLabel("CORP1 ID", 8, 240, 64, 17) Local $userid = GUICtrlCreateInput("", 80, 240, 110, 17) Local $userfullnamelabel = GUICtrlCreateLabel("Full Name", 8, 260, 64, 17) Local $userfullname = GUICtrlCreateInput("", 80, 260, 110, 17) Local $useremaillabel = GUICtrlCreateLabel("E-mail", 8, 280, 64, 17) Local $useremail = GUICtrlCreateInput("", 80, 280, 180, 17) $hsiteslabel = GUICtrlCreateLabel("SITES", 30, 310, 256) GUICtrlSetFont($hsiteslabel, Default, 600) $SVECheckBox = GUICtrlCreateCheckbox('SVE', 8, 330, 64, 23) $FINCheckBox = GUICtrlCreateCheckbox('FIN', 8, 350, 64, 23) $DANCheckBox = GUICtrlCreateCheckbox('DAN', 8, 370, 64, 23) $NORCheckBox = GUICtrlCreateCheckbox('NOR', 8, 390, 64, 23) Select Case $SVECheckBox And BitAND(GUICtrlRead($SVECheckBox), $GUI_CHECKED) = $GUI_CHECKED MsgBox(4096, "SVE checked", "Box1 is checked.") EndSelect Local $idButton_Start = GUICtrlCreateButton("START", 100, 440, 85, 25) Case $idMsg = $serviceuser And BitAND(GUICtrlRead($serviceuser), $GUI_CHECKED) = $GUI_CHECKED $huserlabel = GUICtrlCreateLabel("USER INFORMATION", 30, 180, 256) GUICtrlSetFont($huserlabel, Default, 600) Local $usernamelabel = GUICtrlCreateLabel("USER ID:", 8, 200, 64, 17) Local $username = GUICtrlCreateInput("", 80, 200, 110, 17) Local $userpasslabel = GUICtrlCreateLabel("Password", 8, 220, 64, 17) Local $userpass = GUICtrlCreateInput("", 80, 220, 110, 17) Local $useridlabel = GUICtrlCreateLabel("CORP1 ID", 8, 240, 64, 17) Local $userid = GUICtrlCreateInput("", 80, 240, 110, 17) Local $userfullnamelabel = GUICtrlCreateLabel("Full Name", 8, 260, 64, 17) Local $userfullname = GUICtrlCreateInput("", 80, 260, 110, 17) Local $useremaillabel = GUICtrlCreateLabel("E-mail", 8, 280, 64, 17) Local $useremail = GUICtrlCreateInput("", 80, 280, 180, 17) If IsDeclared("hsiteslabel") Then GUICtrlSetState($hsiteslabel, $GUI_HIDE) GUICtrlSetState($SVECheckBox,$GUI_HIDE) GUICtrlSetState($FINCheckBox,$GUI_HIDE) GUICtrlSetState($DANCheckBox,$GUI_HIDE) GUICtrlSetState($NORCheckBox,$GUI_HIDE) EndIf Local $idButton_Start = GUICtrlCreateButton("START", 100, 440, 85, 25) EndSelect WEnd EndFunc Local $aMsg = 0 While 1 $aMsg = GUIGetMsg(1) Select Case $aMsg[0] = $GUI_EVENT_CLOSE And $aMsg[1] = $hMainGUI ExitLoop EndSelect WEnd ;****************SHOW PASSWORD BLOCK**************** ;~ While 1 ;~ $nMsg = GUIGetMsg() ;~ Switch $nMsg ;~ Case $GUI_EVENT_CLOSE ;~ Exit ;~ Case $Checkbox1 ;~ If (GUICtrlRead($Checkbox1) = $GUI_CHECKED) Then ;~ GUICtrlSendMsg($adminpassword, $EM_SETPASSWORDCHAR, 0, 0) ;~ Else ;~ GUICtrlSendMsg($adminpassword, $EM_SETPASSWORDCHAR, $DefaultPassChar, 0) ;~ EndIf ;~ GUICtrlSetState($adminpassword, $GUI_FOCUS) ;Input needs focus to redraw characters ;~ EndSwitch ;~ WEnd ;****************SHOW PASSWORD BLOCK END************