这个问题很难用一两句话说明,它关系到一个流式窗体的问题,但Delphi这类函数大部份是 Private中定义的,请参考 TWriter, TReader和TPersistent类的source得到答案。

解决方案 »

  1.   

    comanche(太可怕)兄,你既然会这东东,就给小弟我说说。
      

  2.   

    你可以试试这个方法, TStream.WriteComponentRes,这是我找到的最直接的方法了。procedure WriteComponentRes(const ResName: string
    ; Instance: TComponent);DescriptionWriteComponentRes is used internally in the VCL streaming system, but can also be called directly when sending data to other applications on disk. WriteComponentRes is used for streaming components that need data, such as a bitmap, or icon to be stored specifically in a Windows resource-file format.WriteComponentRes calls WriteDescendentRes, passing in nil as the Ancestor. Therefore, WriteDescendentRes initiates the remainder of the streaming process for a component that, in this case, is not a descendant.To read a component written with WriteComponentRes, call the ReadComponentRes method.