哈哈,知道怎麼搞了,好像處理比較完美的,原來GenerateForm是可以重載的: TfrmBase = class(TIWAppForm) private public procedure GenerateForm(AStream: TStream); override; end;procedure TfrmBase.GenerateForm(AStream: TStream);var stream: TStringStream; s: string;begin inherited; stream := TStringStream.Create(''); try AStream.Position := 0; stream.CopyFrom(AStream, AStream.Size); s := stream.DataString; stream.Size := 0; stream.WriteString(AnsiToUtf8(s)); stream.Position := 0; AStream.Size := 0; AStream.CopyFrom(stream, stream.Size); finally stream.Free; end;end;