📄 unit2.pas
字号:
unit Unit2;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm2 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure FormDeactivate(Sender: TObject);
private
{ Private declarations }
procedure AppOnMinimize(Sender:TObject);
public
{ Public declarations }
end;
var
Form2: TForm2;
implementation
{$R *.dfm}
uses unit1;
procedure TForm2.Button1Click(Sender: TObject);
begin
form1.close;
end;
procedure TForm2.AppOnMinimize(Sender:TObject);
begin
ShowWindow(application.handle,SW_HIDE);
//form2.Visible:=true;
end;
procedure TForm2.FormCreate(Sender: TObject);
begin
with application do
begin
OnMinimize:=AppOnMinimize;
end;
end;
procedure TForm2.FormDeactivate(Sender: TObject);
begin
application.Minimize;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -