Ver Mensaje Individual
  #19  
Antiguo 29-07-2010
Avatar de ingabraham
ingabraham ingabraham is offline
Miembro
 
Registrado: ago 2007
Posts: 614
Reputación: 17
ingabraham Va por buen camino
hola un amigo me dio este codigo, como lo puedo adaptar para cambiar la fecha tambien.
q al arrancar mi programa cambie a
dd/mm/aaaa
y al salir
aaaa.mm.dd

en el create del datamodulo y en el destroy
Código Delphi [-]
procedure SetDecimalSeparator(Ch: Char);
var
  DefLCID: LCID;
  Buffer: LPSTR;
begin
  Application.UpdateFormatSettings := True;
  StrPCopy(Buffer, Ch);
  DefLCID := GetThreadLocale;
  if SetLocaleInfo(DefLCID, LOCALE_SDecimal, Buffer) then
    DecimalSeparator := StrPas(Buffer)[1];
  Application.UpdateFormatSettings := False;
end;
procedure SetMoneyDecimalSeparator(Ch: Char);
var
  DefLCID: LCID;
  Buffer: LPSTR;
begin
  Application.UpdateFormatSettings := True;
  StrPCopy(Buffer, Ch);
  DefLCID := GetThreadLocale;
  if SetLocaleInfo(DefLCID, LOCALE_SMONDECIMALSEP, Buffer) then
    DecimalSeparator := StrPas(Buffer)[1];
  Application.UpdateFormatSettings := False;
end;

procedure SetListSeparator(Ch: Char);
var
  DefLCID: LCID;
  Buffer: LPSTR;
begin
  Application.UpdateFormatSettings := True;
  StrPCopy(Buffer, Ch);
  DefLCID := GetThreadLocale;
  if SetLocaleInfo(DefLCID, LOCALE_SLIST, Buffer) then
    DecimalSeparator := StrPas(Buffer)[1];
  Application.UpdateFormatSettings := False;
end;

encontre esta pagina de los codigos :
http://msdn.microsoft.com/en-us/libr...(v=VS.85).aspx
__________________
Enseñar es la virtud de un sabio.

Última edición por ingabraham fecha: 29-07-2010 a las 19:10:13.
Responder Con Cita