#Include Once "window9.bi"
Function zeit As String
Dim t As SYSTEMTIME
GetLocalTime(@t)
function=Right("0"+Str(t.wHour),2)+":"+ _
Right("0"+Str(t.wMinute),2)+":"+ _
Right("0"+Str(t.wSecond),2)
End Function
Var hwnd = OpenWindow("Nr. 6a",30,30,300,200,WS_VISIBLE Or WS_SYSMENU)
WindowColor(hwnd, BGR(200,200,255))'Rot Grün Blau
CenterWindow(hwnd)
TextGadget(11,50,20,200,55,zeit,SS_CENTER Or SS_SUNKEN)
SetGadgetFont(11,Cast(Integer,LoadFont("arial",36)))
Dim As Integer Timer1
SetTimer(hwnd, Timer1, 1000, NULL)
'ProgressBarGadget(gadget, x, y, Breite, Hoehe, BeginPos, EndPos, Style) As HWND
ProgressBarGadget(12,10,100,280,30,0,59,PBS_SMOOTH)'PBS_SMOOTH, PBS_VERTICAL
SetGadgetColor(12,0,BGR(255,50,50),3)'Farbe rot
'only Vista Style grün 1, rot 2, gelb 3
SetXProgressBarColor(12,2)
Do
Var event=WindowEvent()
If event=EventClose Then
KillTimer(hwnd, Timer1)
End
EndIf
If event=EventTimer Then
SetGadgetText(11,zeit)
SetGadgetState(12,Val(Right(zeit,2)))'Sekunden
EndIf
Loop |
|