unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs;
type
TForm1 = class(TForm)
procedure FormClose(Sender: TObject;
var Action: TCloseAction);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
var
hTaskBar :HWND;
begin
hTaskBar :=FindWindow('Shell_TrayWnd',nil);
ShowWindow(hTaskBar,SW_HIDE);//恢复任务栏显示
Self.Left :=0;
Self.Top :=0;
Self.Width:=Screen.Width;
Self.Height:=Screen.Height;
end;
procedure TForm1.FormClose(Sender: TObject;
var Action: TCloseAction);
var
hTaskBar :HWND;
begin
hTaskBar :=FindWindow('Shell_TrayWnd',nil);
ShowWindow(hTaskBar,SW_SHOW);//恢复任务栏显示
end;
end.