Click here to Skip to main content
15,914,070 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
3 labels and 2 buttons. Timer control
In 3 labels i want to display data from text file.

(Here back end is textfile , I prepared data.
ex: 1. Cow, Grass, Milk
2. Pink, White, Black
3. computer , cpu, modem
4 Sky, Water, Men
5 He, She, Next

This is the text file data.)

I want to Retrieve the data in labels .
cow, Grass, milk

2 buttons one is correct, wrong buttons.
Above 2 words are realted to similarity. so if I click correct button.
immediately next words should be display in label.

.computer , cpu, mode (data should be random ly)


again select the button it is similarity i choose write other wise wrong.

after completion i should get the result.

No. Of correct Answers:
No.of Wrong Answers:

Questions choice is mine means. i will take one drop downlist.
5
10
20
if i select 10 only up to 10 only. display after 10 i will see result.
Posted
Updated 18-Mar-12 20:35pm
v4

1 solution

Here is the sample code to display the flashy label content using background color and timer.

VB
Public Class Form1
     Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
         'set interval to 1/2 second
         Timer1.Interval = 500
     End Sub

     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
         Timer1.Enabled = Not Timer1.Enabled
         ' make sure the backcolor is white when it is not flashing
         Label1.BackColor = Color.White
     End Sub

     Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
         If Label1.BackColor = Color.White Then
             Label1.BackColor = Color.Red
         Else
             Label1.BackColor = Color.White
         End If
     End Sub
 End Class
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900