求个openfile 与 readfile函数在delphi下 简单使用实例 用openfile打开某个文件,用readfile读取这个文件 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 procedure TForm1.Button1Click(Sender: TObject);var fh:hfile; ofs:TOFStruct; x: cardinal; ch: array[0..100] of char ;begin fh:=openfile('d:\tt.txt',ofs,OF_READ); readfile(fh,ch,ofs.cBytes,x,nil); ch[x]:=#0; closehandle(fh); showmessage(ch);end; 如何选择合适的串口通讯控件 求助:utf-8显示问题 delphi 函数能返回数组吗? 怎么样快速更新窗体上的控件? update整个表的问题? 超级菜鸟提问:delphi7弹出菜单怎么做? 实现对一个文本文件读操作和写操作 各位好漢!!!要控制鍵盤只能輸入數字,不能輸入字符,應該怎麼寫。急。。。。 请问有关于DELPHI6.0的制作安装程序的书吗? AVAYA提供的OCX控件,怎么注册 setparent 如何获取OpenPictureDialog1打开文件的名称,不包括后缀名
procedure TForm1.Button1Click(Sender: TObject);
var
fh:hfile;
ofs:TOFStruct;
x: cardinal;
ch: array[0..100] of char ;
begin
fh:=openfile('d:\tt.txt',ofs,OF_READ);
readfile(fh,ch,ofs.cBytes,x,nil);
ch[x]:=#0;
closehandle(fh);
showmessage(ch);
end;