Ver Mensaje Individual
  #3 (permalink)  
Antiguo 02/11/2005, 10:09
Avatar de Maxi.Net
Maxi.Net
 
Fecha de Ingreso: abril-2005
Ubicación: R.M. Talagante, Chile!!
Mensajes: 295
Antigüedad: 19 años, 1 mes
Puntos: 2
agradecido de tu ayuda freegirl pero he creado la siguiente rutina y me funca!!

Private Sub txtDocenas_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtDocenas.KeyPress

If e.KeyChar.IsDigit(e.KeyChar) Then
e.Handled = False
ElseIf e.KeyChar.IsControl(e.KeyChar) Then
e.Handled = False
ElseIf e.KeyChar = "," And Not txtDocenas.Text.IndexOf(",") Then
e.Handled = True
ElseIf e.KeyChar = "," Then
e.Handled = False
Else
e.Handled = True
End If

End Sub

Con esto consigo solo ingresar números y una sola ",".

Para la operación matematica hago lo siguiente:

txtDocenas.Text = txtDocenas.Text.Replace(",", ".")
reemplazo la coma por un punto y realizo la operación, luego vuelvo la coma por el punto.

¿Será por la configuración regional?

Espero les sirva ....