在标签中显示Flash Words from textFiles [英] Display Flash Words in label From textFiles
问题描述
3个标签和2个按钮.计时器控制
我想在3个标签中显示文本文件中的数据.
(这里的后端是textfile,我准备了数据.
例如:1.牛,草,牛奶
2.粉色,白色,黑色
3.计算机,CPU,调制解调器
4天空,水,男人
5他,她,下一个
这是文本文件数据.)
我想检索标签中的数据.
牛,草,牛奶
2个按钮,一个是正确的,一个是错误的按钮.
以上两个词具有相似性.因此,如果我单击正确的按钮.
标签上应立即显示下一个单词.
.computer,cpu,模式(数据应随机分配)
再次选择按钮,这是相似的,我选择写其他明智的错误.
完成后,我应该得到结果.
正确答案的数量:
错误答案数:
问题的选择是我的手段.我将参加一个下拉列表.
5
10
20
如果我选择10只,最多10只.在10点之后显示.我将看到结果.
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.
推荐答案
以下是使用背景颜色和计时器显示华而不实的标签内容的示例代码.
Here is the sample code to display the flashy label content using background color and timer.
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
这篇关于在标签中显示Flash Words from textFiles的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!