Die etwas andere Uhr ist eigentlich nur eine Anregung,
wie man auch eine Uhrzeitanzeige gestallten kann.
balknuhr.vbp
Form=Balknuhr.frm
Object={6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.1#0; COMCTL32.OCX
ProjWinSize=77,409,248,215
ProjWinShow=2
IconForm="Form1"
Title="Balknuhr"
ExeName32="Balknuhr.exe"
Name="Projekt1"
HelpContextID="0"
StartMode=0
VersionCompatible32="0"
MajorVer=1
MinorVer=0
RevisionVer=0
AutoIncrementVer=0
ServerSupportFiles=0
VersionCompanyName="" balknuhr.frm
VERSION 4.00
Begin VB.Form Form1
BorderStyle = 4 'Fixed ToolWindow
ClientHeight = 1395
ClientLeft = 2235
ClientTop = 5355
ClientWidth = 5535
Height = 1800
Left = 2175
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1395
ScaleWidth = 5535
ShowInTaskbar = 0 'False
Top = 5010
Width = 5655
Begin VB.CheckBox Check1
Height = 255
Left = 5040
TabIndex = 6
Top = 0
Width = 255
End
Begin VB.Timer Timer1
Interval = 1000
Left = 0
Top = 5400
End
Begin VB.Label Label1
Alignment = 2 'Center
BackStyle = 0 'Transparent
Caption = "0"
Height = 255
Index = 1
Left = 0
TabIndex = 3
Top = 720
Width = 255
End
Begin VB.Label Label1
Alignment = 2 'Center
BackStyle = 0 'Transparent
Caption = "0"
Height = 255
Index = 0
Left = 0
TabIndex = 1
Top = 240
Width = 255
End
Begin VB.Label Label1
Alignment = 2 'Center
BackStyle = 0 'Transparent
Caption = "0"
Height = 255
Index = 2
Left = 0
TabIndex = 5
Top = 1200
Width = 255
End
Begin ComctlLib.Slider Slider1
Height = 255
Index = 2
Left = 0
TabIndex = 4
Top = 960
Width = 5535
_ExtentX = 9763
_ExtentY = 450
_Version = 327680
Max = 59
SelStart = 1
Value = 1
End
Begin VB.Label Label2
Alignment = 2 'Center
Caption = "Ton"
Height = 255
Left = 4920
TabIndex = 7
Top = 240
Width = 495
End
Begin ComctlLib.Slider Slider1
Height = 255
Index = 0
Left = 0
TabIndex = 0
Top = 0
Width = 4935
_ExtentX = 8705
_ExtentY = 450
_Version = 327680
Max = 23
End
Begin ComctlLib.Slider Slider1
Height = 255
Index = 1
Left = 0
TabIndex = 2
Top = 480
Width = 5535
_ExtentX = 9763
_ExtentY = 450
_Version = 327680
Max = 59
SelStart = 1
Value = 1
End
End
Attribute VB_Name = "Form1"
Attribute VB_Creatable = False
Attribute VB_Exposed = False
Private Sub Form_Load()
Dim Stunden, Minuten, Sekunde As Integer
Stunden = Format(Time, "HH")
Minuten = Format(Time, "NN")
Sekunde = Format(Time, "SS")
Slider1(0).Value = Stunden
Slider1(1).Value = Minuten
Slider1(2).Value = Sekunde
If Check1.Value = 1 Then Beep
Label1(0).Caption = Stunden
Label1(0).Left = 203.5 * Stunden
Label1(1).Caption = Minuten
Label1(1).Left = 90 * Minuten
Label1(2).Caption = Sekunde
Label1(2).Left = 90 * Sekunde
If Sekunde > 0 And Sekunde < 11 Then Form1.Caption = Format(Date,
"DD.MM.YYYY")
If Sekunde > 10 And Sekunde < 26 Then Form1.Caption = "Ein Tipp der
VB-Homepage"
If Sekunde > 25 And Sekunde < 60 Then Form1.Caption = "Die etwas andere
Uhr"
Show
Check1.SetFocus
End Sub
Private Sub Timer1_Timer()
Dim Stunden, Minuten, Sekunde As Integer
Stunden = Format(Time, "HH")
Minuten = Format(Time, "NN")
Sekunde = Format(Time, "SS")
Slider1(0).Value = Stunden
Slider1(1).Value = Minuten
Slider1(2).Value = Sekunde
If Check1.Value = 1 Then Beep
Label1(0).Caption = Stunden
Label1(0).Left = 203.5 * Stunden
Label1(1).Caption = Minuten
Label1(1).Left = 90 * Minuten
Label1(2).Caption = Sekunde
Label1(2).Left = 90 * Sekunde
If Sekunde > 0 And Sekunde < 11 Then Form1.Caption = Format(Date,
"DD.MM.YYYY")
If Sekunde > 10 And Sekunde < 26 Then Form1.Caption = "Ein Tipp der
VB-Homepage"
If Sekunde > 25 And Sekunde < 60 Then Form1.Caption = "Die etwas andere
Uhr"
End Sub |