Public Class Form2
Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
If TextBox1.Text = 123456 Then
MsgBox("Activated")
ElseIf TextBox1.Text = 1234567 Then
MsgBox("Activated2")
End If
End Sub
End Class
我有一個輸入框,有2個組合給你一個msgbox,但是如果輸入是其他內容,我該如何獲取它呢?在vb.net中,是否有其他變量?
我相信在Else-Block之前如果? – muffi
還是開關盒? –