by Bhushan R Bajracharya (4 Submissions)
Category: Windows System Services
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Sun 1st December 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Display time on a label and move it around on your form
dim x,y as integer
x=100
y=100
'put this code on timer1_time
Label1.Caption = Format(Time, "hh:mm:ss ampm")
Label1.Move Label1.Left + X, Label1.Top + Y
If Label1.Left < ScaleLeft Then X = 100
If Label1.Left + Label1.Width > ScaleLeft + ScaleWidth Then
X = -100
End If
If Label1.Top < ScaleTop Then Y = 100
If Label1.Top + Label1.Height > ScaleTop + ScaleHeight Then
Y = -100
End If