1.在记事本中写
mytxt txt readme.txt
然后保存文件名为readme.rc
2.brcc32.exe readme.rc 得到 readme.res
3.在程序用调用
{$R readme.res}
procedure TForm1.Button1Click(Sender: TObject);
var
Res_txt:Tresourcestream;
begin
Res_txt:=Tresourcestream.Create(hinstance,'mytxt','txt');
Memo1.Lines.LoadFromStream(Res_txt);
Res_txt.Free;
end;