viewer.pas

来自「一个磁盘文件被删除后恢复的源程序! 内嵌汇编代码~!」· PAS 代码 · 共 66 行

PAS
66
字号
unit viewer;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ExtCtrls, ldiskio, StdCtrls, hHexDump;

type
  TForm1 = class(TForm)
    HexDump1: THexDump;
    procedure FormCreate(Sender: TObject);
    procedure FormActivate(Sender: TObject);
  private
    { Private declarations }
    hexdump: THexdump;
  public
    { Public declarations }
  end;

var
  s: tmemorystream;
  Form1: TForm1;
  buf: array[0..511] of byte;


implementation

{$R *.dfm}


procedure TForm1.FormCreate(Sender: TObject);
var
  mystream: tfilestream;
begin
  (*hexdump := THexDump.Create(self);

  with hexdump do
  begin
    parent:=self;
    font.name:='FixedSys';
    ShowCharacters:=true;
    align:=alClient;
    left:=1;
    Top:=1;
    //Width:=300;
    //height:=500;
    color:=clwhite;
    font.color:=clblack;
  end;*)

   mystream:=tfilestream.create('C:\AUTOEXEC.BAT', fmOpenRead);
   HexDump1.Stream := mystream;

   hexdump1.enabled:=true;
end;


procedure TForm1.FormActivate(Sender: TObject);
begin
  hexdump1.SetFocus;
end;


end.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?