出错信息Resource not found mytxt117
rc中是这样定义的“mytxt1 txt 1.abc”
代码如下(在代码中我加入了{$R a.res}):
procedure TForm1.Button1Click(sender :tobject);
begin
Randomize();
key:=Random(299)+1;
with  TResourceStream.Create(HInstance, 'mytxt'+inttostr(key), RT_RCDATA)  do
 begin
  SaveToFile('c:\temp.txt');
  Free;
 end;
Form1.M1.Lines.LoadFromFile('c:\temp.txt');
Form1.Edit1.Text:=inttostr(key);