Uhr
Verfasst: 16.12.2005 19:34
Was ist hier falsch???
Ich komm einfach nicht mehr weiter!!!
Bitte helft mir!!!
Ich komm einfach nicht mehr weiter!!!
Bitte helft mir!!!
Code: Alles auswählen
; PureBasic Visual Designer v3.80 build 1249
;- Window Constants
;
Enumeration
#Window_0
EndEnumeration
;- Gadget Constants
;
Enumeration
#Minute
#Stunde
#Sekunde
#FStunde
#FMinute
#FSekunde
#PBStunde
#PBSekunde
#PBMinute
#Gadget_10
#Gadget_11
#Gadget_12
#Gadget_13
#Gadget_14
#Gadget_16
#Gadget_21
#Gadget_22
#Gadget_23
EndEnumeration
;- Fonts
;
Global FontID1
FontID1 = LoadFont(1, "Alibi", 72)
Global FontID2
FontID2 = LoadFont(2, "Alibi", 48)
;- Image Plugins
;- Image Globals
Global Image0
Global Image1
Global Image2
;- Catch Images
Image0 = CatchImage(0, "gfx\BGesicht1.bmp")
Image1 = CatchImage(1, "gfx\BGesicht2.bmp")
Image2 = CatchImage(2, "gfx\BName.bmp")
;- Images
DataSection
Image0:
IncludeBinary "gfx\BGesicht1.bmp"
Image1:
IncludeBinary "gfx\BGesicht2.bmp"
Image2:
IncludeBinary "gfx\BName.bmp"
EndDataSection
Procedure Open_Window_0()
If OpenWindow(#Window_0, 216, 0, 642, 342, #PB_Window_SystemMenu | #PB_Window_SizeGadget | #PB_Window_TitleBar , "New window ( 0 )")
If CreateGadgetList(WindowID())
TextGadget(#Minute, 280, 30, 90, 110, "59")
SetgadgetFont(#Minute, FontID1)
TextGadget(#Stunde, 80, 30, 90, 110, "24", #PB_Text_Center)
SetgadgetFont(#Stunde, FontID1)
TextGadget(#Sekunde, 480, 30, 90, 110, "59")
SetgadgetFont(#Sekunde, FontID1)
Frame3DGadget(#FStunde, 20, 10, 200, 160, "Stunde")
Frame3DGadget(#FMinute, 220, 10, 200, 160, "Minute")
Frame3DGadget(#FSekunde, 420, 10, 200, 160, "Sekunde")
ProgressBarGadget(#PBStunde, 30, 150, 180, 10, 0, 24,#PB_ProgressBar_Smooth)
ProgressBarGadget(#PBSekunde, 430, 150, 180, 10, 0, 60,#PB_ProgressBar_Smooth)
ProgressBarGadget(#PBMinute, 230, 150, 180, 10, 0, 60,#PB_ProgressBar_Smooth)
Frame3DGadget(#Gadget_10, 180, 170, 70, 110, "Tag")
Frame3DGadget(#Gadget_11, 250, 170, 70, 110, "Monat")
Frame3DGadget(#Gadget_12, 320, 170, 140, 110, "Jahr")
TextGadget(#Gadget_13, 190, 190, 60, 80, "31", #PB_Text_Center)
SetgadgetFont(#Gadget_13, FontID2)
TextGadget(#Gadget_14, 260, 190, 60, 80, "12", #PB_Text_Center)
SetgadgetFont(#Gadget_14, FontID2)
TextGadget(#Gadget_16, 330, 190, 120, 80, "2005", #PB_Text_Center)
SetgadgetFont(#Gadget_16, FontID2)
ImageGadget(#Gadget_21, 0, 170, 180, 170, Image0)
ImageGadget(#Gadget_22, 460, 170, 180, 170, Image1)
ImageGadget(#Gadget_23, 180, 280, 280, 60, Image2)
EndIf
EndIf
EndProcedure
Open_Window_0()
Repeat
tag$ = Str(Day(Date()))
monat$ = Str(Month(Date()))
jahr$ = Str(Year(Date()))
stunde$ = Str(Hour(Date()))
minute$ = Str(Minute(Date()))
sekunde$ = Str(Second(Date()))
sekunde.l=Val(sekunde$)
If sekunde.l < 10
Sekunde$= "0"+sekunde$
EndIf
minute.l=Val(minute$)
If minute.l < 10
minute$= "0"+minute$
EndIf
Stunde.l=Val(Stunde$)
If Stunde.l < 10
Stunde$= "0"+Stunde$
EndIf
datum$ = tag$+"."+monat$+"."+jahr$
zeit$ = stunde$+":"+minute$+":"+sekunde$
;MessageRequester("Aktuelle Zeit",datum$+" "+sekunde$,0)
SetGadgetText(#Stunde, Stunde$)
SetGadgetText(#Minute, Minute$)
SetGadgetText(#Sekunde, Sekunde$)
SetGadgetState(#PBSekunde, Val(sekunde$))
SetGadgetState(#PBMinute, Val(minute$))
SetGadgetState(#PBStunde, Val(Stunde$))
Delay (50)
EventID.l = WindowEvent()
If EventID = #PB_Event_CloseWindow
Quit = 1
EndIf
Until Quit = 1
End