vb 编程 鼠标在command1按下时窗体背景颜色为红色,鼠标抬起时窗体背景颜色为绿色
2个回答
展开全部
Private Sub Command1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Me.BackColor = vbRed
End Sub
Private Sub Command1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
Me.BackColor = vbGreen
End Sub
Me.BackColor = vbRed
End Sub
Private Sub Command1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
Me.BackColor = vbGreen
End Sub
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
Private Sub Command1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
Me.BackColor = vbRed
End If
End Sub
Private Sub Command1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
Me.BackColor = vbGreen
End If
End Sub
If Button = 1 Then
Me.BackColor = vbRed
End If
End Sub
Private Sub Command1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
Me.BackColor = vbGreen
End If
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询