⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ofpdemo.pas

📁 漏洞扫描系列中HB Network Scanner 测试用练习代码
💻 PAS
字号:
unit OFPDemo;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  ObjectsForm, epHint, MediaLib;

type
  TOFPForm = class(TForm)
    OForm: TepObjectsForm;
    procedure FormCreate(Sender: TObject);
    procedure OFormMouseUpEvent(IDCode, X, Y: Integer; ObjectRect: TRect;
      Button: TMouseButton);
    procedure OFormMouseDownEvent(IDCode, X, Y: Integer; ObjectRect: TRect;
      Button: TMouseButton);
    procedure FormActivate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  OFPForm: TOFPForm;

implementation

uses OFDemoUnit, SCDemoUnit, Main;

{$R *.DFM}

procedure TOFPForm.FormCreate(Sender: TObject);
begin
  with OForm do
  begin
    SelectActiveObject(1, Rect(14, 89, 38, 105),Rect(14, 89, 38, 105), True,
                       'Player-imitation');
    SelectActiveObject(2, Rect(28, 110, 50, 125),Rect(28, 110, 50, 125), True,
                       'Scaning controls');
    SelectActiveObject(3, Rect(47, 127, 69, 141),Rect(47, 127, 69, 141), True, '');
    SelectActiveObject(4, Rect(71, 137, 93, 151),Rect(71, 137, 93, 151), True, '');
    SelectActiveObject(12, Rect(62, 47, 210, 71), Rect(62, 47, 210, 71), True, '');
    SelectActiveObject(13, Rect(17, 38, 32, 50), NullRect, False, 'Close');
  end;
end;

procedure TOFPForm.OFormMouseUpEvent(IDCode, X, Y: Integer;
  ObjectRect: TRect; Button: TMouseButton);
begin
  if Button = mbLeft then
  case IDCode of
    13: Close;
  end;
end;

procedure TOFPForm.OFormMouseDownEvent(IDCode, X, Y: Integer;
  ObjectRect: TRect; Button: TMouseButton);
begin
  if Button = mbLeft then
  case IDCode of
    1: OFForm.Show;
    2: SCForm.Show;
    3: MessageDlg('Call special methods' + #13 +
                  'for selecting objects in pictures.', mtInformation,
                   [mbOk], 0);
    4: MessageDlg('Use TepHint component for hints.', mtInformation,
                   [mbOk], 0);
  end;
end;

procedure TOFPForm.FormActivate(Sender: TObject);
begin
  frmMain.OFPDemoHint.Active := True;
end;

end.

⌨️ 快捷键说明

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