salut
j'ai trouver ces deux procedure mais le procedure load ne fonctionne pas sil vous plait expliquer mois comment fonctionne se deux procedure
procedure SaveLabel(Res: TLabel; aName: String);
Begin
Try
WriteComponentResFile(ExtractFilePath(ParamStr(0))+aName, Res);
Except
MessageBox(Application.Handle, 'Cannot saving the component !', 'Error', $10);
end;
end;
Procedure LoadLabel(var aLabel: TLabel; aName: String);
var
Str: String;
Begin
Try
Str := ExtractFilePath(ParamStr(0))+aName;
aLabel := ReadComponentResFile(Str, aLabel) as TLabel;
Except
MessageBox(Application.Handle, 'Cannot loading the component !', 'Error', $10);
end;
end;
pour l'enregistrement
SaveLabel(Label1, 'Label.dat');
pour l'appel
LoadLabel(Label1, 'Label.dat');
il faut indiquer que label1 est cree et enregistrer dans le fichier label.dat
et merci d'avance