你可以试试这个方法, 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.
; 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.