VB.Net msgbox垃圾邮件?

时间:2016-12-09 17:14:10

标签: vb.net-2010

Gyazo链接:https://gyazo.com/98a8aa13cdd294eb098fd05228220adc 问题:当我单击“确定”时,它只会打开一个新的msgbox 你在做什么?:丹麦学校的数学课程 如果你知道我做错了什么,请帮助我。

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

    ' Opgave 1

    If Label2.Text = "Opgave 1/20" Then
        If TextBox1.Text = "13445" Then
            MsgBox("Du svarede rigtigt!")
            Label2.Text = "Opgave 2/20"
            My.Settings.rigtig = +1
            My.Settings.score = +1
            Label3.Text = "6256 + 1116 + 1185 - 79"
        Else
            MsgBox("Du svarede forkert.")
            My.Settings.forkert = +1
            Label2.Text = "Opgave 2/20"
            Label3.Text = "6256 + 1116 + 1185 - 79"
        End If
    End If

    ' Opgave 2

    If Label2.Text = "Opgave 2/20" Then
        If TextBox1.Text = "8478" Then
            MsgBox("Du svarede rigtigt!")
            Label2.Text = "Opgave 3/20"
            My.Settings.rigtig = +1
            My.Settings.score = +1
            Label3.Text = "17773 + 1665 + 12379"
        Else
            MsgBox("Du svarede forkert.")
            My.Settings.forkert = +1
            Label2.Text = "Opgave 3/20"
            Label3.Text = "17773 + 1665 + 12379"
        End If
    End If

    ' Opgave 3

    If Label2.Text = "Opgave 3/20" Then
        If TextBox1.Text = "31817" Then
            MsgBox("Du svarede rigtigt!")
            Label2.Text = "Opgave 4/20"
            My.Settings.rigtig = +1
            My.Settings.score = +1
            Label3.Text = "27554 - 10422"
        Else
            MsgBox("Du svarede forkert.")
            My.Settings.forkert = +1
            Label2.Text = "Opgave 4/20"
            Label3.Text = "27554 - 10422"
        End If
    End If

    ' Opgave 4

    If Label2.Text = "Opgave 4/20" Then
        If TextBox1.Text = "17123" Then
            MsgBox("Du svarede rigtigt!")
            Label2.Text = "Opgave 5/20"
            My.Settings.rigtig = +1
            My.Settings.score = +1
            Label3.Text = "25812 - 6667 + 17374"
        Else
            MsgBox("Du svarede forkert.")
            My.Settings.forkert = +1
            Label2.Text = "Opgave 5/20"
            Label3.Text = "25812 - 6667 + 17374"
        End If
    End If

    ' Opgave 5

    If Label2.Text = "Opgave 5/20" Then
        If TextBox1.Text = "36519" Then
            MsgBox("Du svarede rigtigt!")
            Label2.Text = "Opgave 6/20"
            My.Settings.rigtig = +1
            My.Settings.score = +1
            Label3.Text = "175173 + 19774"
        Else
            MsgBox("Du svarede forkert.")
            My.Settings.forkert = +1
            Label2.Text = "Opgave 6/20"
            Label3.Text = "175173 + 19774"
        End If
    End If
End Sub

0 个答案:

没有答案