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....

Recommended Answers

All 3 Replies

Member Avatar for abbajee

I could not figure out wot you are trying to ask actually but how much i get i,m ataching a vb6.0 project that might help ur task

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

oh tnx..this is a big help for me...tnx a lot

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.