使用res的出错信息

cucumberqlt 2005-01-18 08:06:12
出错信息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);
...全文
61 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
Kshape 2005-01-19
  • 打赏
  • 举报
回复
mytxt117
----------
楼主
这个东西是哪里来的?
你在哪里引用了呢?
ly_liuyang 2005-01-18
  • 打赏
  • 举报
回复
当然,你只有一个Res:MyTxt1而已,没有MyTxt117的

你的程序本来就是错误的

http://lysoft.7u7.net

1,183

社区成员

发帖
与我相关
我的任务
社区描述
Delphi Windows SDK/API
社区管理员
  • Windows SDK/API社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧