为什么要变成txt?用一个过滤程序把小于32的字符改为'.',就像DOS下的DEBUG一样
解决方案 »
- 怎么样学好DELPHI+MSSQL编程
- 散尽最后一分,祝各位中秋节快乐!
- 现在有那些关于delphi opengl方面的书呢?推荐一下吧.
- SOL Server 和Delphi 连接问题(在线等)
- 请问,在DevExpress控件包里有没有DBLookUpCombobox这样的控件啊
- 三层结构中,主从表更新问题!
- 高分征求解决方案
- ComboBox1中当选中ComboBox1的某一个时知道表中另一个字段是什么信息!
- 快过春节了,上www.hbpcc.net/unisoft上查查万年历吧,还是源码
- public, private,published,protected 有什么区别
- 如何把字符串写入TXT文件
- delphi有右函数,左函数,像VB的Left,Mid,Right
procedure TForm1.Button1Click(Sender: TObject);var
iFileHandle: Integer;
iFileLength: Integer;
iBytesRead: Integer;
Buffer: PChar;
i: Integer
begin
if OpenDialog1.Execute then
begin
try
iFileHandle := FileOpen(OpenDialog1.FileName, fmOpenRead);
iFileLength := FileSeek(iFileHandle,0,2);
FileSeek(iFileHandle,0,0);
Buffer := PChar(AllocMem(iFileLength + 1));
iBytesRead := FileRead(iFileHandle, Buffer, iFileLength);
FileClose(iFileHandle); for i := 0 to iBytesRead-1 do
begin
StringGrid1.RowCount := StringGrid1.RowCount + 1;
StringGrid1.Cells[1,i+1] := Buffer[i];
StringGrid1.Cells[2,i+1] := IntToStr(Integer(Buffer[i]));
end;
finally
FreeMem(Buffer);
end;
end;
end;