我的代码:
Private Sub PictureBox1_Click(sender As Object, e As EventArgs) Handles PictureBox1.Click
PictureBox1.Enabled = False
End Sub
Private Sub PictureBox2_Click(sender As Object, e As EventArgs) Handles PictureBox2.Click
PictureBox2.Left = "90"
End Sub
如何更改PictureBox1和PictureBox2的名称?示例我只需更改其名称,如:
Private Sub PictureBox1_Click(sender As Object, e As EventArgs) Handles PictureBox1.Click
I.Enabled = False
End Sub
Private Sub PictureBox2_Click(sender As Object, e As EventArgs) Handles PictureBox2.Click
I.Left = "90"
End Sub
'I change their name to "I"
答案 0 :(得分:1)
您可以从属性窗口执行此操作。您所需要做的就是:
请记住,您不能在一个表单中使用两个不同的对象,因此您必须为它们指定不同的名称