📄 dllaboutform.pas
字号:
unit DLLAboutForm;
interface
uses Windows, SysUtils, Classes, Graphics, Forms, Controls, StdCtrls,
Buttons, ExtCtrls;
type
TAboutBox = class(TForm)
Panel1: TPanel;
ProgramIcon: TImage;
ProductName: TLabel;
Version: TLabel;
Copyright: TLabel;
OKButton: TButton;
Panel2: TPanel;
Comments: TLabel;
private
{ Private declarations }
public
{ Public declarations }
end;
{the exported prototype for displaying the about box}
function ShowAboutBox(DLLHandle: THandle; ExampleName,
Comments: ShortString): Boolean; export;
var
AboutBox: TAboutBox;
implementation
{$R *.DFM}
function ShowAboutBox(DLLHandle: THandle; ExampleName,
Comments: ShortString): Boolean;
begin
{initialize the result value}
Result := FALSE;
{create the about box form}
AboutBox := TAboutBox.Create(Application);
{initialize the labels with the strings passed in}
AboutBox.ProductName.Caption := ExampleName;
AboutBox.Comments.Caption := Comments;
{display a modal about box}
AboutBox.ShowModal;
{release the form}
AboutBox.Release;
{free the DLL and exit the thread from which it was called}
FreeLibraryAndExitThread(DLLHandle, 12345);
{indicate that the function completed}
Result := TRUE;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -