文件名称:如何从流中还原组件实例?-afe4403说明书
文件大小:5.68MB
文件格式:PDF
更新时间:2024-06-22 08:00:15
Delphi
(2) 如何从流中还原组件实例? procedure TForm1.Button2Click(Sender: TObject); var FileStrm: TFileStream; StrStrm: TStringStream; BinStrm: TMemoryStream; Button: TButton; begin FileStrm := TFileStream.Create(’ReadButton.txt’, fmOpenRead); {用文件保存 Button 的数据} StrStrm := TStringStream.Create(’’); BinStrm := TMemoryStream.Create; Button := TButton.Create(Self); FileStrm.Position := 0;