Dim LastLabel_lighted
Const HIGHTLIGHCOLOR = &HFFFF00 Const NORMALCOLOR = &HC00000 Private Sub Form_Load() LastLabel_lighted = -1 End Sub Private Sub Form_MouseMove(Button As Integer, Shift _ As Integer, X As Single, Y As Single) If LastLabel_lighted <> -1 Then _ Label1(LastLabel_lighted).ForeColor = _ NORMALCOLOR: LastLabel_lighted = -1 End Sub Private Sub Label1_MouseMove(Index As Integer, _ Button As Integer, Shift As Integer, _ X As Single, Y As Single) If Index <> LastLabel_lighted Then If LastLabel_lighted <> -1 Then _ Label1(LastLabel_lighted).ForeColor = NORMALCOLOR Label1(Index).ForeColor = HIGHTLIGHCOLOR LastLabel_lighted = Index End If End Sub |