Board index » delphi » TStrings.SaveToStream & TStrings.LoadFromStream
ajax
![]() Delphi Developer |
Fri, 22 Jun 2001 03:00:00 GMT
TStrings.SaveToStream & TStrings.LoadFromStream
I just find that TStrings.SaveToStream & TStrings.LoadFromStream do the
different work with SaveToFile & LoadFromFile. For example, Memo1.Lines.SaveToFile('FileName1'); The Memo1's content is unchanged. However, Memo1.Lines.SaveToStream(Stream1); The Memo1's Content got blank. I try to trace the source code. I find that I should write And I am confused with Stream1.Position:=0 and Stream1.Seek(0,0), do they Anyone would like the share the reason with me? Thanks a lot. Ajax. |