MrTheDzam

Form có label nhấp nháy

Jun 23rd, 2016
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 0.61 KB | None | 0 0
  1. #include "GUIConstantsEx.au3"
  2. #include "StaticConstants.au3"
  3. #include "WindowsConstants.au3"
  4.  
  5. Opt("GUIOnEventMode", 1)
  6.  
  7. Global $Form1 = GUICreate("Form có label nhấp nháy", 565, 288, 192, 124)
  8. GUISetOnEvent($GUI_EVENT_CLOSE, "Form1Close")
  9. Global $Label1 = GUICtrlCreateLabel("Nhấp nháy", 56, 72, 447, 107)
  10. GUICtrlSetFont(-1, 69, 400, 0, "Arial")
  11. GUISetState(@SW_SHOW)
  12.  
  13. AdlibRegister("NhapNhay", 1000)
  14.  
  15. While 1
  16.     Sleep(100)
  17. WEnd
  18.  
  19. Func NhapNhay()
  20.     Local $MaMau = [0x00FF00, 0xFF00FF, 0x0000FF, 0xFF0000]
  21.     GUICtrlSetColor($Label1, $MaMau[Random(0, 3, 1)])
  22. EndFunc
  23.  
  24. Func Form1Close()
  25.     Exit
  26. EndFunc
Advertisement
Add Comment
Please, Sign In to add comment