1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
| Public WithEvents BTNGMShowGraph As MSForms.CommandButton
Private Sub BTNGMShowGraph_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
With BTNGMShowGraph
.BackColor = IIf(X > 10 And X < .Width - 10 And Y > 10 And Y < .Height - 10, vbGreen, &H8000000F)
End With
End Sub
Private Sub FRM_Graph_Menu_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
Dim ctrl As Control
Dim Bouton As Classe1
Dim Collect As New Collection
' Ce Dim Collect As a New Collection vient avant la procédure ou est integré tel que je le montre ici ?
If Collect.Count = 0 Then
For Each ctrl In FRM_Graph_Menu.Controls
If TypeOf ctrl Is MSForms.CommandButton Then
Set Bouton = New Classe1
Set Bouton.BTNGMShowGraph = ctrl
Collect.Add Bouton
End If
Next ctrl
End If
End Sub |
Partager