📄 mainunit.pas
字号:
unit MainUnit;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Menus, DB, ADODB, Grids, StdCtrls;
type
InvokeDLLForm = function(App: TApplication; Scr: TScreen): TForm;
TfrmMain = class(TForm)
MainMenu1: TMainMenu;
M_Invoke: TMenuItem;
mi_inDLL: TMenuItem;
mi_inGeneral: TMenuItem;
m_Windows: TMenuItem;
N4: TMenuItem;
N5: TMenuItem;
N1: TMenuItem;
N2: TMenuItem;
N3: TMenuItem;
procedure mi_inDLLClick(Sender: TObject);
procedure N2Click(Sender: TObject);
procedure mi_inGeneralClick(Sender: TObject);
procedure N3Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
frmMain: TfrmMain;
DLLForm: TForm;
implementation
uses GeneralFormUnit, AboutUnit;
{$R *.dfm}
procedure TfrmMain.mi_inDLLClick(Sender: TObject);
var
DLLHandle: THandle;
DLLSub: InvokeDLLForm;
begin
DLLHandle := LoadLibrary('prjDLL.dll');
if DLLHandle <> 0 then
begin
@DLLSub := GetProcAddress(DLLHandle, 'CreateDLLForm');
if Assigned(DLLSub) then
begin
DLLForm := DLLSub(Application, Screen);
end;
end;
end;
procedure TfrmMain.N2Click(Sender: TObject);
begin
Showmessage('看看内容');
end;
procedure TfrmMain.mi_inGeneralClick(Sender: TObject);
begin
Application.CreateForm(TfrmGeneralForm, frmGeneralForm);
end;
procedure TfrmMain.N3Click(Sender: TObject);
begin
Application.CreateForm(TfrmAbout, frmAbout);
frmAbout.Showmodal;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -