1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| Private Sub DG_HistoriqueAchats_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) _
Handles DG_HistoriqueAchats.KeyPress
If _IsDecimalPressed Then
e.KeyChar = CultureInfo.CurrentCulture.NumberFormat.CurrencyDecimalSeparator
End If
End Sub
Private Sub DG_HistoriqueAchats_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) _
Handles DG_HistoriqueAchats.KeyDown
If e.KeyData = Keys.Decimal Then
_IsDecimalPressed = True
End If
End Sub
Private Sub DG_HistoriqueAchats_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) _
Handles DG_HistoriqueAchats.KeyUp
_IsDecimalPressed = False
End Sub |
Partager