#include #include #include #include #include #Include #Region ### START Koda GUI section ### Form= ;---------------------------- Phần Form hiển thị Full Screen ----------------------------------------------- $Form1 = GUICreate("THI LY THUYET", 1360, 768, -1, -1, BitOR($WS_MAXIMIZEBOX, $WS_MINIMIZEBOX, $WS_SIZEBOX)) GUISetStyle($WS_POPUP, -1, $Form1) WinMove($Form1, "", 0, 0, @DesktopWidth, @DesktopHeight) GUISetStyle($WS_POPUP, -1, $Form1) ;--------------------------------Thành phần của Form như: nút, TexBox...------------------------------------ GUISetBkColor(0x2B72CC) $Label1 = GUICtrlCreateLabel("ĐĂNG NHẬP", 48, 16, 118, 26) GUICtrlSetFont(-1, 14, 800, 0, "Times New Roman") GUICtrlSetColor(-1, 0xFFFFFF) $Label2 = GUICtrlCreateLabel("Tên Đăng Nhập:", 16, 80, 134, 26) GUICtrlSetFont(-1, 14, 800, 0, "Times New Roman") GUICtrlSetColor(-1, 0xFFFF00) $Label3 = GUICtrlCreateLabel("Mật Khẩu:", 16, 120, 87, 26) GUICtrlSetFont(-1, 14, 800, 0, "Times New Roman") GUICtrlSetColor(-1, 0xFFFF00) $Input1 = GUICtrlCreateInput("", 152, 80, 161, 30) GUICtrlSetFont(-1, 14, 800, 0, "Times New Roman") $Input2 = GUICtrlCreateInput("", 152, 120, 161, 30, BitOR($ES_PASSWORD, $ES_AUTOHSCROLL)) GUICtrlSetFont(-1, 14, 800, 0, "Times New Roman") $Button1 = GUICtrlCreateButton("Đăng Nhập", 160, 160, 139, 25) GUICtrlSetFont(-1, 14, 800, 0, "Times New Roman") GUICtrlSetColor(-1, 0xFFFF00) GUICtrlSetBkColor(-1, 0x0000FF) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 If GUICtrlRead($Input1)='admin' And GUICtrlRead($Input2)='123' Then MsgBox(0,"Thông Báo:","Đăng Nhập Thành Công") Else MsgBox(0,"Thông Báo:", "Đăng Nhập Thất Bại") GUICtrlSetData($Input1, "") GUICtrlSetData($Input2, "") _WinAPI_SetFocus(ControlGetHandle("", "", $Input1)) EndIf EndSwitch WEnd