Streams question lazarus / 8-Other ---------------------------------------------------------------------- daz · 2009-07-10 05:38 Can I set a Tstream = to a TMemoryStream? Doesn't give any compiler warnings and doesn't yell at me when the app is run, but it doesn't seem to be working. As a further explanation; I'm loading image files into TMemoryStreams, and trying to pass them to "procedure LoadFromStream(AStream:TStream);" The memory streams are good because if I do a .savetofile it dumps out the image correctly, and at least it thinks that some tstreams were set, because it's count is 3 (and I've loaded 3 streams into it). Just, andorra 2d doesn't draw the images, so I was thinking maybe I can't do  tstream := tmemorystream, in which case I need an alternative. I tried tstream.copyfrom(tmemorystream,0); but it wouldn't allow me to write to a tstream. ---------------------------------------------------------------------- theo · 2009-07-10 07:43 TStream is an abstract base class. There shouldn't be Instances of TStream but of TMemoryStream, TFileStream, .... ---------------------------------------------------------------------- Zaher · 2009-07-11 11:35 for TMemoryStream make a seek before loading AStream.Seek(0, soFromBeginning); LoadFromStream(AStream);