unit1.pas.~2~

来自「bin form to tex form」· ~2~ 代码 · 共 42 行

~2~
42
字号
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs;

type
  TForm1 = class(TForm)
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}
 function IsBinDfm(const ADfmFileName: string): Boolean;
  Var
   mBinStream:TMemoryStream;
   mBuff : array [0..2] of byte;
  begin
   mBinStream := TMemoryStream.Create;
   try
   mBinStream.LoadFromFile(ADfmFileName);
   mBinStream.Read(mBuff, 3);
   //前三字节: $FF, $0A, $00
   if (mBuff[0] = $FF) and (mBuff[1] = $0A) and (mBuff[2]= $00) then
   Result := True
   else
   Result := False;
   finally
   mBinStream.Free;
   end;
  end;
end.

⌨️ 快捷键说明

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