本文整理自网络,侵删。
procedure TForm1.Button1Click(Sender: TObject);
var
F:file of char ;
S:array[1..11] of char;
i:integer;
begin
if OpenDialog1.Execute then { Display Open dialog box }
begin
AssignFile(F, OpenDialog1.FileName); { File selected in dialog }
Reset(F);
Seek(F,16);
for i:=1 to 11 do
Read(F, S[i]); { Read first line of file }
Edit1.Text := S;
for i:=1 to 11 do
Write(F,S[i]);
CloseFile(F);
end;
end;
相关阅读 >>
winapi 字符及字符串函数(4): charupperbuff - 把缓冲区中指定数目的字符转大写
Delphi android device information
Delphi 取得开机时间 开机时间总长度(可精确到秒,分钟等)
更多相关阅读请进入《Delphi》频道 >>