1个回答
展开全部
shape控件没有鼠标点击事件,不过你可以将shape控件放入Picturebox容器中,给你个简单例子,在Shape控件上单击,shape立即变成红色:
Private Sub Form_Load()
Picture1.Move Shape1.Left, Shape1.Top, Shape1.Width, Shape1.Height
Picture1.BorderStyle = 0
Shape1.Move 0, 0
End Sub
Private Sub Picture1_Click()
Shape1.BackColor = vbRed
Shape1.BackStyle = 1
End Sub
Private Sub Form_Load()
Picture1.Move Shape1.Left, Shape1.Top, Shape1.Width, Shape1.Height
Picture1.BorderStyle = 0
Shape1.Move 0, 0
End Sub
Private Sub Picture1_Click()
Shape1.BackColor = vbRed
Shape1.BackStyle = 1
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询