VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Display time on a label and move it around on your form

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

Rate 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


Download this snippet    Add to My Saved Code

Display time on a label and move it around on your form Comments

No comments have been posted about Display time on a label and move it around on your form. Why not be the first to post a comment about Display time on a label and move it around on your form.

Post your comment

Subject:
Message:
0/1000 characters