0
我有一個由面板,圖片框和標籤組成的「按鈕」。在標籤上禁用鼠標事件(啓用時)
我已禁用圖片框和標籤以保持MouseEnter(和背景顏色)處於活動狀態。 但是,禁用的標籤具有通常的淡化文本 - 是否有一種方法可以使標籤保持啓用狀態,但忽略鼠標事件,就像禁用時一樣?
Private Sub panelBackup_MouseEnter(sender As Object, e As EventArgs) Handles panelBackupButton.MouseEnter
Dim btn As Panel = DirectCast(sender, Panel)
btn.BackColor = Color.Gray
End Sub
Private Sub panelBackup_MouseLeave(sender As Object, e As EventArgs) Handles panelBackupButton.MouseLeave
Dim btn As Panel = DirectCast(sender, Panel)
btn.BackColor = Color.LightGray
End Sub
嗨,該功能用於多個面板,因此我試圖施放。 – madlan