Ver Mensaje Individual
  #5  
Antiguo 24-08-2015
cocute cocute is offline
Miembro
 
Registrado: nov 2008
Posts: 403
Reputación: 16
cocute Va por buen camino
Al final creo que lo he solucionado, si usar inis, guardando datos en un memo invisible
he guardado el valor del volumen del sonido de un trackbar
y si quieres sonido o no de un switch

Código Delphi [-]
procedure TForm.FormClose(Sender: TObject;
  var Action: TCloseAction);
 begin
mmo1.Lines.Strings[1]:=FloatToStr(tr1.Value);
if swtchchk1.IsChecked=True then  mmo1.Lines.Strings[0]:='1';
if swtchchk1.IsChecked=false then  mmo1.Lines.Strings[0]:='0';

mmo1.Lines.savetoFile(TPath.Combine(TPath.GetDocumentsPath, 'SAVE.INI' )) ;


end;

procedure TForm.FormCreate(Sender: TObject);

 begin
if FileExists( TPath.Combine(TPath.GetDocumentsPath, 'SAVE.INI')) then
 begin
mmo1.Lines.LoadFromFile(TPath.Combine(TPath.GetDocumentsPath, 'SAVE.INI' )) ;
tr1.Value:=StrTofloat(mmo1.Lines.Strings[1]);
if mmo1.Lines.Strings[0]='1' then swtchchk1.IsChecked:=True;
if mmo1.Lines.Strings[0]='0' then swtchchk1.IsChecked:=false;

end;
Responder Con Cita