我是编程新手,我想制作三个分别添加X+1
,X+3
和X+5
的按钮。我尝试了一些东西,弹出错误“BC30491”。这是代码(不要介意Do(25)和循环(27))
Public Class Form1
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
End Sub
Private Sub Panel1_Paint(sender As Object, e As PaintEventArgs) Handles Panel1.Paint
End Sub
Private Sub TextBox2_TextChanged(sender As Object, e As EventArgs)
End Sub
Private Sub ComboBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles Campis1.SelectedIndexChanged
End Sub
Private Sub Campis2_SelectedIndexChanged(sender As Object, e As EventArgs) Handles Campis2.SelectedIndexChanged
End Sub
Private Sub Añ1_Click(sender As Object, e As EventArgs) Handles Añ1.Click
Do
Añ1_Click(sender, e).PerformClick = TextBox1.Text = "1"
Loop
End Sub
End Class
答案 0 :(得分:0)
尝试更换:
Añ1_Click(sender, e).PerformClick = TextBox1.Text = "1"
使用:
TextBox1.Text = "1"
并删除Do
循环。