标签未显示变量为编码

时间:2014-04-03 12:04:07

标签: vb.net label

我有一系列测试,当用户完成时,分数存储在变量中并写入文件。在我的程序中是每个用户的进度屏幕,它应该显示标签中的所有测试分数。

我已使用此代码显示标签中的分数:  lblTopic1Score.Text = Topic1Score

但是,当我运行系统并进入进度表单时,标签为空白。 有人可以帮忙吗?

进度表格代码:

 Private Sub StProgress_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        lblTopic1Score.Text = Topic1Score
        lblTotalScore.Text = TotalScore

        lblStName.Text = namest
        LblStSurname.Text = surnamest

End Sub

创建模块以存储公共变量 Public Topic1Score As String

这是测试本身的代码摘录

If answers(i) = questions(i, 4) And FileOpenStatusTS = False Then

            Topic1Score += 1
            TotalScore += 1

        End If

    Next

    If yearst = "12" And classst = "A" Then
        FileOpen(1, FileName12A1, OpenMode.Append)
        FileOpenStatus12A1 = True

        'Once all the details have been entered and checked, then they are written to the Teacher accounts text file'
        WriteLine(1, Username, Topic1Score, TotalScore)
        FileClose(1)
    End If`

0 个答案:

没有答案