MrTheDzam

Chỉnh sửa GUI

Jun 9th, 2016
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 3.84 KB | None | 0 0
  1. #include <ButtonConstants.au3>
  2. #include <EditConstants.au3>
  3. #include <GUIConstantsEx.au3>
  4. #include <StaticConstants.au3>
  5. #include <WindowsConstants.au3>
  6.  
  7. $tieude = "GhostMonster - Tools"
  8.  
  9. Opt('GuiOnEventMode', 1)
  10.  
  11. ;===================RandomMatKhau======================;
  12. $pwd = ""
  13. Dim $aSpace[3]
  14. $digits = 5
  15. For $i = 1 To $digits
  16.     $aSpace[0] = Chr(Random(65, 90, 1)) ;A-Z
  17.     $aSpace[1] = Chr(Random(97, 122, 1)) ;a-z
  18.     $aSpace[2] = Chr(Random(48, 57, 1)) ;0-9
  19.     $pwd &= $aSpace[Random(0, 2, 1)]
  20. Next
  21. MsgBox(0, $tieude, "Mật khẩu để đăng nhập : " & $pwd)
  22. ;==========================================================;
  23. Global $nCheck
  24. AdlibRegister('thoigian')
  25. ;================GuiDangNhap================;
  26. $Form1 = GUICreate($tieude, 361, 203, -1, -1)
  27. GUISetOnEvent($GUI_EVENT_CLOSE, "FormMainClose")
  28. $Group1 = GUICtrlCreateGroup("Đăng Nhập", 8, 8, 337, 185)
  29. $EnterPassLabel = GUICtrlCreateLabel("Mật Khẩu :", 15, 119, 81, 21, 0)
  30. GUICtrlSetFont(-1, 11, 800, 0, "Times New Roman")
  31. GUICtrlSetColor(-1, 0x000000)
  32. $PasswordEdit = GUICtrlCreateInput("", 97, 119, 161, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_PASSWORD))
  33. $ButtonDN = GUICtrlCreateButton("Đăng Nhập", 267, 86, 67, 57, $BS_NOTIFY)
  34. GUICtrlSetOnEvent(-1, "DangNhap")
  35. GUICtrlSetFont(-1, 8, 800, 0, "Times New Roman")
  36. GUICtrlSetColor(-1, 0x00FF00)
  37. $Label1 = GUICtrlCreateLabel("Tài Khoản :", 16, 88, 81, 21)
  38. GUICtrlSetFont(-1, 11, 800, 0, "Times New Roman")
  39. GUICtrlSetColor(-1, 0x000000)
  40. $Input1 = GUICtrlCreateInput("", 97, 88, 161, 21)
  41. $Button1 = GUICtrlCreateButton("?", 312, 160, 27, 25)
  42. GUICtrlSetOnEvent(-1, "thongtin")
  43. $Label2 = GUICtrlCreateLabel("Đăng Nhập", 104, 32, 144, 36)
  44. GUICtrlSetFont(-1, 22, 800, 0, "Times New Roman")
  45. GUICtrlSetColor(-1, 0x000000)
  46. GUICtrlCreateGroup("", -99, -99, 1, 1)
  47. $hLabel = GuiCtrlCreateLabel("", 16, 175, 150, 12)
  48. GUISetState(@SW_SHOW)
  49. #EndRegion ### END Koda GUI section ###
  50.  
  51.  
  52. While 1
  53.     Sleep(69)
  54. WEnd
  55.  
  56. Func FormMainClose()
  57.     Exit
  58. EndFunc
  59.  
  60. Func thoigian()
  61.     If @SEC <> $nCheck Then
  62.         GUICtrlSetData($hLabel,@HOUR & ":" & @MIN & ":" & @SEC & " || " & @MDAY & "/" & @MON & "/" & @YEAR )
  63.         $nCheck = @SEC
  64.     EndIf
  65. EndFunc
  66.  
  67. Func DangNhap()
  68.     If GUICtrlRead($Input1) = "GhostMonsterIT" And GUICtrlRead($PasswordEdit) = $pwd Then
  69.         MsgBox(0,$tieude,"Đăng nhập thành công !!!")
  70.     Else
  71.         MsgBox(0,$tieude,"Đăng nhập không thành công !!!")
  72.     EndIf
  73. EndFunc
  74.  
  75. ;GhostMonsterIT
  76. ;j59sy
  77.  
  78. Func thongtin()
  79.     Global $Form2 = GUICreate("Thông Tin", 322, 236, 302, 218)
  80.     GUISetOnEvent($GUI_EVENT_CLOSE, "ChildFormClose")
  81.     Global $GroupBox1 = GUICtrlCreateGroup("", 8, 8, 305, 185)
  82.     Global $Image3 = GUICtrlCreatePic("C:\Users\Administrator\Desktop\Gui\11164824_465937286895581_5351719548539907701_n.jpg", 16, 24, 105, 97)
  83.     GUICtrlCreateLabel("Tên phần mềm :", 128, 80, 86, 19)
  84.     GUICtrlSetFont(-1, 10, 800, 0, "Times New Roman")
  85.     GUICtrlCreateLabel("Phiên bản :", 128, 104, 65, 19)
  86.     GUICtrlSetFont(-1, 10, 800, 0, "Times New Roman")
  87.     GUICtrlCreateLabel("Copyright :", 16, 168, 66, 19)
  88.     GUICtrlSetFont(-1, 10, 800, 0, "Times New Roman")
  89.     GUICtrlCreateLabel("GhostMonster_it™", 80, 168, 96, 17)
  90.     GUICtrlCreateLabel("Người tạo :", 128, 32, 67, 19)
  91.     GUICtrlSetFont(-1, 10, 800, 0, "Times New Roman")
  92.     GUICtrlCreateLabel("GhostMonster_it", 208, 32, 85, 19)
  93.     GUICtrlSetFont(-1, 9, 400, 2, "Times New Roman")
  94.     GUICtrlSetColor(-1, 0xFF0000)
  95.     GUICtrlCreateLabel("Tools", 224, 80, 50, 19)
  96.     GUICtrlSetFont(-1, 9, 400, 0, "Times New Roman")
  97.     GUICtrlCreateLabel("v1.0", 208, 104, 25, 18)
  98.     GUICtrlSetFont(-1, 8, 400, 0, "Times New Roman")
  99.     GUICtrlCreateGroup("", -99, -99, 1, 1)
  100.     GUICtrlSetCursor (-1, 2)
  101.     $Buttontt = GUICtrlCreateButton("&OK", 124, 208, 75, 25, 0)
  102.     GUICtrlSetOnEvent(-1, "ChildFormClose")
  103.     GUISetState(@SW_SHOW)
  104. EndFunc
  105.  
  106. While 2
  107.     Sleep(69)
  108. WEnd
  109.  
  110. Func ChildFormClose()
  111.     GUIDelete($Form2)
  112. EndFunc
Advertisement
Add Comment
Please, Sign In to add comment