回复 8# zpmc123
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <Timers.au3>
Opt("GUIOnEventMode", 1)
Global $LTIME, $SS_CENTER, $SS_CENTERIMAGE
GUI_D()
While 1
Sleep(1000)
GUICtrlSetData($LTIME, " " &@HOUR & ":" & @MIN & ":" & @SEC)
WEnd
Func GUI_D();登录
$Form1 = GUICreate(" " , 397, 240, -1, -1,BitOR($WS_POPUP, $WS_CLIPSIBLINGS))
GUISetBkColor(0xC0E0FF);GUISetBkColor(0xfbfcfd)
GUISetOnEvent($GUI_EVENT_CLOSE, "Form1Close")
;$pBG = GUICtrlCreatePic(@ScriptDir & "\1.jpg", 0, 0, 397, 240)
;GUICtrlSetState(-1, $GUI_DISABLE)
$LTIME = GUICtrlCreateLabel(" " & @HOUR & ":" & @MIN & ":" & @SEC& "", 0, 0, 347, 30, $SS_CENTER + $SS_CENTERIMAGE, $GUI_WS_EX_PARENTDRAG)
GUICtrlSetBkColor(-1, 0x677780)
GUICtrlSetColor(-1, 0xFFFF00)
GUICtrlSetFont(-1, 14, 600, 0, "MS Sans Serif")
$btnMin = GUICtrlCreateLabel("━", 347, 0, 25, 30, $SS_CENTER);━
GUICtrlSetBkColor(-1, 0x677780)
GUICtrlSetColor(-1, 0xfbfcfd)
GUICtrlSetFont(-1, 11, 800, 0, "MS Sans Serif")
;GUICtrlSetOnEvent(-1, "btnMin")
$btnClose = GUICtrlCreateLabel("X", 372, 0, 25, 30, $SS_CENTER);
GUICtrlSetBkColor(-1, 0x677780)
GUICtrlSetColor(-1, 0xFF0000)
GUICtrlSetFont(-1, 14, 600, 0, "MS Sans Serif")
GUICtrlSetOnEvent(-1, "Form1Close")
GUISetState(@SW_SHOW)
EndFunc ;==>GUI_D
Func Form1Close()
GUIDelete()
Exit
EndFunc ;==>Form1Close
|