Re: Need Help ASAP.... plz plz plz plz help me out
I this much but i geting error in
lable1.Caption = Format$(Now, "ss") line which came in yellow color can u help me plzz
Code:
Dim a As Integer
Private Sub Command1_Click()
Timer1.Enabled = True
End Sub
Private Sub Command2_Click()
Timer1.Enabled = False
End Sub
Private Sub Form_Load()
Timer1.Enabled = False
End Sub
Private Sub Label1_Click()
End Sub
Private Sub Timer1_Timer()
lable1.Caption = Format$(Now, "ss")
a = Format$(Now, "ss")
If (a Mod 2 = 0) Then
Shape1.BackColor = vbRed
Shape2.BackColor = vbBlue
Else
Shape1.BackColor = vbBlue
Shape2.BackColor = vbRed
End If
End Sub
Re: Need Help ASAP.... plz plz plz plz help me out
it's just Blue and red ...... but i am want to switch them in rainbow color how to do that ?? can u tell me plzz... means which thing need to add in this coding
Code:
Code:
Dim a As Integer
Private Sub Command1_Click()
Timer1.Enabled = True
End Sub
Private Sub Command2_Click()
Timer1.Enabled = False
End Sub
Private Sub Form_Load()
Timer1.Enabled = False
End Sub
Private Sub Timer1_Timer()
Label1.Caption = Format$(Now, "ss")
a = Format$(Now, "ss")
If (a Mod 2 = 0) Then
Shape1.BackColor = vbRed
Shape2.BackColor = vbBlue
Else
Shape1.BackColor = vbBlue
Shape2.BackColor = vbRed
End If
End Sub
Re: Need Help ASAP.... plz plz plz plz help me out
You would need to add more colors and change your code a bit where the mod() is used.
example:
Code:
x=a mod(5)
select case x
Case 0
Case 1
Case 2
Case 3
Case 4
End Select
Put your colors under the proper case and you can get 5 different sets with the example above. Of course you can play with the values to make it more or less.
Re: Need Help ASAP.... plz plz plz plz help me out
No I am not coding it for you. Put your code to change colors in between the case statements. If you do not understand case statements then look it up and do a little reading on the subject so you can understand them better.
Bookmarks