错误:属性访问必须分配给属性或使用其值

时间:2016-03-17 03:40:20

标签: vb.net

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    Shell("Shutdown /s /t 60 /c See_You_Again!!!")
    If ComboBox1.Text = "IKWAS-JATI1" Then
        Button1("See_You_Again")
    End If
End Sub

1 个答案:

答案 0 :(得分:0)

我认为您正在尝试根据ComboBox1.Text设置按钮文本,如果是这样,您必须使用Button1.Text,因此您的代码段将是:

If ComboBox1.Text = "IKWAS-JATI1" Then
    Button1.Text = "See_You_Again"
End If