Option Explicit
Const D_Lbl_Def_Bac As Long = 10066329
Const D_Lbl_Def_Bor As Long = 5066061
Const D_Lbl_Def_FoCol As Long = 16579836
Const D_Lbl_Move_Bac As Long = 13750737
Const D_Lbl_Move_Bor As Long = vbWhite
Const D_Lbl_Move_FoCol As Long = 6184542
Dim D_Bo_Lbl_1 As Boolean
Dim D_Bo_Lbl_2 As Boolean
Dim D_Bo_Lbl_3 As Boolean
Dim D_Bo_Lbl_4 As Boolean
Const D_L1_Top_Mi As Single = 30
Const D_L1_Top_Ma As Single = 48
Const D_L1_Left_Mi As Single = 12
Const D_L1_Left_Ma As Single = 102
Const D_L2_Top_Mi As Single = 30
Const D_L2_Top_Ma As Single = 48
Const D_L2_Left_Mi As Single = 126
Const D_L2_Left_Ma As Single = 216
Const D_L3_Top_Mi As Single = 72
Const D_L3_Top_Ma As Single = 90
Const D_L3_Left_Mi As Single = 12
Const D_L3_Left_Ma As Single = 102
Const D_L4_Top_Mi As Single = 72
Const D_L4_Top_Ma As Single = 90
Const D_L4_Left_Mi As Single = 126
Const D_L4_Left_Ma As Single = 216
Private Sub lbl_3_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
lbl_3.BackColor = D_Lbl_Move_Bac
lbl_3.BorderColor = D_Lbl_Move_Bor
lbl_3.ForeColor = D_Lbl_Move_FoCol
D_Bo_Lbl_3 = True
End Sub
Private Sub lbl_4_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
lbl_4.BackColor = D_Lbl_Move_Bac
lbl_4.BorderColor = D_Lbl_Move_Bor
lbl_4.ForeColor = D_Lbl_Move_FoCol
D_Bo_Lbl_4 = True
End Sub
Private Sub lbl_1_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
lbl_1.BackColor = D_Lbl_Move_Bac
lbl_1.BorderColor = D_Lbl_Move_Bor
lbl_1.ForeColor = D_Lbl_Move_FoCol
D_Bo_Lbl_1 = True
End Sub
Private Sub lbl_2_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
lbl_2.BackColor = D_Lbl_Move_Bac
lbl_2.BorderColor = D_Lbl_Move_Bor
lbl_2.ForeColor = D_Lbl_Move_FoCol
D_Bo_Lbl_2 = True
End Sub
Private Sub UserForm_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
If D_Bo_Lbl_1 = True Then
If Y < D_L1_Top_Mi Or Y > D_L1_Top_Ma Then
lbl_1.BackColor = D_Lbl_Def_Bac
lbl_1.BorderColor = D_Lbl_Def_Bor
lbl_1.ForeColor = D_Lbl_Def_FoCol
D_Bo_Lbl_1 = False
Exit Sub
End If
If X < D_L1_Left_Mi Or X > D_L1_Left_Ma Then
lbl_1.BackColor = D_Lbl_Def_Bac
lbl_1.BorderColor = D_Lbl_Def_Bor
lbl_1.ForeColor = D_Lbl_Def_FoCol
D_Bo_Lbl_1 = False
Exit Sub
End If
End If
If D_Bo_Lbl_2 = True Then
If Y < D_L2_Top_Mi Or Y > D_L2_Top_Ma Then
lbl_2.BackColor = D_Lbl_Def_Bac
lbl_2.BorderColor = D_Lbl_Def_Bor
lbl_2.ForeColor = D_Lbl_Def_FoCol
D_Bo_Lbl_2 = False
Exit Sub
End If
If X < D_L2_Left_Mi Or X > D_L2_Left_Ma Then
lbl_2.BackColor = D_Lbl_Def_Bac
lbl_2.BorderColor = D_Lbl_Def_Bor
lbl_2.ForeColor = D_Lbl_Def_FoCol
D_Bo_Lbl_2 = False
Exit Sub
End If
End If
If D_Bo_Lbl_3 = True Then
If Y < D_L3_Top_Mi Or Y > D_L3_Top_Ma Then
lbl_3.BackColor = D_Lbl_Def_Bac
lbl_3.BorderColor = D_Lbl_Def_Bor
lbl_3.ForeColor = D_Lbl_Def_FoCol
D_Bo_Lbl_3 = False
Exit Sub
End If
If X < D_L3_Left_Mi Or X > D_L3_Left_Ma Then
lbl_3.BackColor = D_Lbl_Def_Bac
lbl_3.BorderColor = D_Lbl_Def_Bor
lbl_3.ForeColor = D_Lbl_Def_FoCol
D_Bo_Lbl_3 = False
Exit Sub
End If
End If
If D_Bo_Lbl_4 = True Then
If Y < D_L4_Top_Mi Or Y > D_L4_Top_Ma Then
lbl_4.BackColor = D_Lbl_Def_Bac
lbl_4.BorderColor = D_Lbl_Def_Bor
lbl_4.ForeColor = D_Lbl_Def_FoCol
D_Bo_Lbl_3 = False
Exit Sub
End If
If X < D_L4_Left_Mi Or X > D_L4_Left_Ma Then
lbl_4.BackColor = D_Lbl_Def_Bac
lbl_4.BorderColor = D_Lbl_Def_Bor
lbl_4.ForeColor = D_Lbl_Def_FoCol
D_Bo_Lbl_4 = False
Exit Sub
End If
End If
End Sub
|