VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Change label caption randomly

by sumeet haldankar (5 Submissions)
Category: Miscellaneous
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Fri 27th September 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Change label caption randomly

API Declarations


Dim i As Integer

Rate Change label caption randomly



Private Sub Form_Load()
arr(0) = "Ford Mustang"
arr(1) = "GMC Sierra"
arr(2) = "Honda Accord"
arr(3) = "Toyota Tacoma"
arr(4) = "Dodge Durango"
End Sub

Private Sub Timer1_Timer()
If i = 4 Then
    Label1.Caption = arr(4)
    i = 0
Else
Label1.Caption = arr(i)
i = i + 1
End If
End Sub


Download this snippet    Add to My Saved Code

Change label caption randomly Comments

No comments have been posted about Change label caption randomly. Why not be the first to post a comment about Change label caption randomly.

Post your comment

Subject:
Message:
0/1000 characters