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

📄 plugintest.pas

📁 Jedi Code Library JCL JVCL 组件包 JCL+JVCL超过300个组件的非可视/可视大型组件包。
💻 PAS
字号:
unit PluginTest;

interface

uses
   Windows,
   Messages,
   SysUtils,
   Classes,
   Dialogs,
   Forms,
   JvPlugin,
   JvPlgIntf;

type
  TTest = class(TJvPlugin, IMyPluginInterface)
    procedure JvPluginDestroy(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
    Procedure ShowPlug(Sender : TObject);
  end;

function RegisterPlugin : TTest; stdcall;

exports
  RegisterPlugin;

implementation

uses ufrmPluginForm;

{$R *.DFM}

// IMPORTANT NOTE: If you change the name of the Plugin container,
// you must set the type below to the same type. (Delphi changes
// the declaration, but not the procedure itself. Both the return
// type and the type created must be the same as the declared type above.
function RegisterPlugin : TTest;
begin
  Result := TTest.Create(nil);
end;

{ TTest }

procedure TTest.ShowPlug(Sender: TObject);
begin
     if frmPluginForm=nil then
        frmPluginForm:=TfrmPluginForm.Create(Application);

     frmPluginForm.Show;
     //ShowMessage('ShowPlug was called');
end;

procedure TTest.JvPluginDestroy(Sender: TObject);
begin
     FreeAndNil(frmPluginForm);
end;

end.

⌨️ 快捷键说明

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