salve ragazzi!!
c è un modo per far si che la rotellina del muose si muova all interno di un msflexgrid?
salve ragazzi!!
c è un modo per far si che la rotellina del muose si muova all interno di un msflexgrid?
- DenvEr -
Prima aggiungi il controllo MouseWheelCatcher.ocx
poi scrivi questo che ti metto ora, ma bada che devo migliorarlo in quanto se arrivi all'ultima riga si blocca, e sulla prima da un brutto effetto grafico.
codice:Private Sub WheelCatcher_WheelRotation(Rotation As Long, x As Long, y As Long, CtrlHwnd As Long) If MIA_FLEX.Rows <> MIA_FLEX.Row + 1 Then If MIA_FLEX.Row = 0 Then With MIA_FLEX .Row = .Row + 1 .RowSel = .Row .ColSel = .Cols - 1 If .RowIsVisible(.Row) = False Then .TopRow = .Row .SetFocus End With Else If MIA_FLEX.Rows = MIA_FLEX.Row + 1 Then With MIA_FLEX .Row = .Row - 1 .RowSel = .Row .ColSel = .Cols - 1 If .RowIsVisible(.Row) = False Then .TopRow = .Row .SetFocus End With Else With MIA_FLEX .Row = .Row - Rotation .RowSel = .Row .ColSel = .Cols - 1 If .RowIsVisible(.Row) = False Then .TopRow = .Row .SetFocus End With End If End If End If End Sub
Dovresti anche dirgli DOVE può scaricare il controllo, non credi?Originariamente inviato da StegcO
Prima aggiungi il controllo MouseWheelCatcher.ocx![]()
![]()
Grazi Gibra! in rete almeno fino ad ora non ho trovato nulla!![]()
- DenvEr -
Concordo. E aggiungo che si dovrebbe almeno citarne l'autore.Originariamente inviato da gibra
Dovresti anche dirgli DOVE può scaricare il controllo, non credi?
StegcO, già postare codice da copia-incollare non è una buona pratica; ma se prorpio lo vuoi fare, almeno cerca di postare codice... un po' meno illogico.
Dovresti trovarlo ... da queste parti...Originariamente inviato da DenvEr87
Grazi Gibra! in rete almeno fino ad ora non ho trovato nulla!![]()
![]()
http://forum.masterdrive.it/search.php?searchid=198925
N.B. Forse devi essere iscritto al forum per scaricarlo.
![]()
si scusate.. io ho copiaincollato il codice ma ho anche specificato che ha dei problemi, magari lui trova una soluzione migliore![]()
Non ha solo problemi di funzionamento, è la logica che non va. Per esempio...ho anche specificato che ha dei problemi
codice:If MIA_FLEX.Rows <> MIA_FLEX.Row + 1 Then 'tutto quello che segue verrà eseguito solo se .Rows è diverso da .Row+1 If MIA_FLEX.Row = 0 Then With MIA_FLEX .Row = .Row + 1 .RowSel = .Row .ColSel = .Cols - 1 If .RowIsVisible(.Row) = False Then .TopRow = .Row .SetFocus End With Else '...quindi la condizione che segue non potrà mai essere vera If MIA_FLEX.Rows = MIA_FLEX.Row + 1 Then With MIA_FLEX .Row = .Row - 1 .RowSel = .Row .ColSel = .Cols - 1 If .RowIsVisible(.Row) = False Then .TopRow = .Row .SetFocus End With Else With MIA_FLEX .Row = .Row - Rotation .RowSel = .Row .ColSel = .Cols - 1 If .RowIsVisible(.Row) = False Then .TopRow = .Row .SetFocus End With End If End If End If
Grazie Gibra! ho risolto!
e un grazie a tutti coloro che mi hanno dato una mano!![]()
- DenvEr -
eppure a me funziona.. anche la parte dove te dici che non si verifica mai..Originariamente inviato da Grumpy
Non ha solo problemi di funzionamento, è la logica che non va. Per esempio...
codice:If MIA_FLEX.Rows <> MIA_FLEX.Row + 1 Then 'tutto quello che segue verrà eseguito solo se .Rows è diverso da .Row+1 If MIA_FLEX.Row = 0 Then With MIA_FLEX .Row = .Row + 1 .RowSel = .Row .ColSel = .Cols - 1 If .RowIsVisible(.Row) = False Then .TopRow = .Row .SetFocus End With Else '...quindi la condizione che segue non potrà mai essere vera If MIA_FLEX.Rows = MIA_FLEX.Row + 1 Then With MIA_FLEX .Row = .Row - 1 .RowSel = .Row .ColSel = .Cols - 1 If .RowIsVisible(.Row) = False Then .TopRow = .Row .SetFocus End With Else With MIA_FLEX .Row = .Row - Rotation .RowSel = .Row .ColSel = .Cols - 1 If .RowIsVisible(.Row) = False Then .TopRow = .Row .SetFocus End With End If End If End If