这是很久以前做的了,将控件给流化,就是将控件的特征转化成字符串,传递到另一台机器上,然后在另一台机器上还原。可以做到远程的界面复制。因为代码不在我现在的机器上,只找到其中类似的代码片段,以供你参考,如果你看不懂的话,你就需要补充RTTI的基本知识了。祝你好运procedure TtxStreamData.FromString(AData: String);var iLen: Integer; strDate: string; procedure LoadPropertyValue(AObject: TObject); var _PropList: PPropList; i, j: integer; begin if not Assigned(AObject) then Exit; for i := 0 to GetPropList(AObject, _PropList) - 1 do begin if _PropList.PropType^.Kind in [tkString, tkLString, tkWString] then begin SetStrProp(AObject, _PropList.Name, StringToValue(_PropList.Name)); end; if _PropList.PropType^.Kind in [tkInteger] then begin SetOrdProp(AObject, _PropList.Name, StringToInteger); end; if _PropList.PropType^.Kind in [tkInt64] then begin SetInt64Prop(AObject, _PropList.Name, StringToInteger); end; if _PropList.PropType^.Kind in [tkFloat] then begin SetFloatProp(AObject, _PropList.Name, StringToFloat); end; if _PropList.PropType^.Kind in [tkEnumeration] then begin SetEnumProp(AObject, _PropList.Name, StringToValue(_PropList.Name)); end; // tkChar, tkEnumeration, , // tkSet, tkClass, tkWChar, // tkVariant, tkArray, tkRecord, tkInterface, , tkDynArray if _PropList.PropType^.Kind = tkClass then begin LoadPropertyValue(GetObjectProp(AObject, _PropList)); end; end; Dispose(_PropList); if AObject is TCollection then begin TCollection(AObject).Clear; { TODO : 2007-02-24 update } //必须将数量给写上去 j := StringToInteger; for i := 0 to j - 1 do begin LoadPropertyValue(TCollection(AObject).Add); end; end end;begin strDate := DecodeBase64(AData); /// strDate := DecodeString(AData); iLen := Length(strDate); FStringStream.Size := 0; FStringStream.Write(PChar(strDate)^, iLen); FStringStream.Position := 0; LoadPropertyValue(Self);end;