Visual Basic - PUNTO Y COMA DECIMAL

Life is soft - evento anual de software empresarial
 
Vista:

PUNTO Y COMA DECIMAL

Publicado por DARIO (28 intervenciones) el 26/11/2003 21:36:38
Cuál es el comando o rutina para cambiar en configueracion regional los signos de división decimal o de miles.... es decir el punto o la coma-.-
Desde ya gracias a cualquier ayuda que me puedan brindar...

Darío
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:PUNTO Y COMA DECIMAL

Publicado por daniel (145 intervenciones) el 26/11/2003 23:50:01
no se si te entendi bien pero si es que cuando ingrese el punto del pad numerico aparezca una coma en los decimales ej, queres escribir 100,50 y por teclado te queda 100.50 en la sub textbox1_keypress(Keyascii as integer) escribi
if keyascii=asc(".") then keyascii=asc(",")
exit sub
asi te aseguras que cuando teclee el operador cambie...
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE:PUNTO Y COMA DECIMAL

Publicado por Cecilia Colalongo (3116 intervenciones) el 27/11/2003 01:00:30
Lo puedes hacer con GetLocaleInfo y SetLocaleInfo:

Public Declare Function GetLocaleInfo Lib "kernel32" Alias "GetLocaleInfoA" (ByVal Locale As Long, ByVal LCType As Long, ByVal lpLCData As String, ByVal cchData As Long) As Long

Public Declare Function SetLocaleInfo Lib "kernel32" Alias "SetLocaleInfoA" (ByVal Locale As Long, ByVal LCType As Long, ByVal lpLCData As String) As Long

Public Const LOCALE_ICURRDIGITS = &H19 ' # local monetary digits
Public Const LOCALE_ICURRENCY = &H1B ' positive currency mode
Public Const LOCALE_IDIGITS = &H11 ' number of fractional digits
Public Const LOCALE_IINTLCURRDIGITS = &H1A ' # intl monetary digits
Public Const LOCALE_ILZERO = &H12 ' leading zeros for decimal
Public Const LOCALE_INEGCURR = &H1C ' negative currency mode
Public Const LOCALE_INEGSEPBYSPACE = &H57 ' mon sym sep by space from neg amt
Public Const LOCALE_INEGSIGNPOSN = &H53 ' negative sign position
Public Const LOCALE_INEGSYMPRECEDES = &H56 ' mon sym precedes neg amt
Public Const LOCALE_IPOSSEPBYSPACE = &H55 ' mon sym sep by space from pos amt
Public Const LOCALE_IPOSSIGNPOSN = &H52 ' positive sign position
Public Const LOCALE_IPOSSYMPRECEDES = &H54 ' mon sym precedes pos amt
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar