0

im new to vb6..plz help me to solve my problem..
1.I make a textbox that can input time
2. I have a shape in form
3. I use label to display time
how can i change the color of shapes in red when i input the exact time in the textbox in the in the displayed time?

tnx a lot....

3
Contributors
3
Replies
4
Views
8 Years
Discussion Span
Last Post by dollmar
0

Make a textbox called text1 and a shape called shape 1 and a command button
you can change the shape of the shape in the properties side bar.

this code will check if what is in the textbox is the actual current time in the hour:minute format. Note that if its 8:00 you must enter 08:00.

Just copy this code into the command button.

If Text1.Text = Format(Time, "HH:MM") Then
Shape1.BackStyle = 1 'to make it opaque instead of transperent
Shape1.BackColor = &HFF& ' the key code for red
End If

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.