|
楼主 |
发表于 2024-4-11 15:04
|
显示全部楼层
就是把按钮放在透明label上,label置底
Private Sub cmdClear_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
With cmdClear
If X > 0 And Y > 0 And X < .Width And Y < .Height Then '按钮上方
.BackColor = RGB(255, 255, 0) '按钮颜色(黄色)
.ForeColor = &HFF0000 '蓝色
.Font.Bold = True
End If
End With
End Sub
Private Sub Label1_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
cmdClear.BackColor = &H8000000F
cmdClear.Font.Bold = False
cmdClear.ForeColor = &H80000012
End Sub |
|