- Bouton gauche pour déplacer
- Clic droit pour fermer
Code : Tout sélectionner
EnableExplicit
Enumeration
#Win
#Timer
#Txt_Timer
EndEnumeration
OpenWindow(#Win, 0, 0, 120, 28, "", #PB_Window_BorderLess | #PB_Window_ScreenCentered)
AddWindowTimer(#Win, #Timer, 1000)
TextGadget (#Txt_Timer, 0, 0, WindowWidth(#Win), WindowHeight(#Win), "", #PB_Text_Center)
SetGadgetColor(#Txt_Timer, #PB_Gadget_BackColor, RGB(173, 255, 47))
SetGadgetFont (#Txt_Timer, FontID(LoadFont(#PB_Any, "Verdana", 16, #PB_Font_Bold)))
Repeat
Select WaitWindowEvent()
Case #PB_Event_Timer
If EventTimer() = #Timer
SetGadgetText(#Txt_Timer, FormatDate("%hh:%ii:%ss", Date()))
EndIf
Case #WM_LBUTTONDOWN
SendMessage_(WindowID(#Win), #WM_NCLBUTTONDOWN, #HTCAPTION, 0)
Case #PB_Event_RightClick
End
EndSelect
ForEver
End
