您的位置:首页 > 其它

程序隐藏状态栏全屏显示

2013-02-25 11:09 246 查看
程序可以在隐藏状态栏全屏显示和原始状态显示之间切换

unit Unit13;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;

type
TForm13 = class(TForm)
btn1: TButton;
procedure btn1Click(Sender: TObject);
private
{ Private declarations }
L, T, W, H : integer;
public
{ Public declarations }
end;

var
Form13: TForm13;

implementation

{$R *.dfm}

procedure TForm13.btn1Click(Sender: TObject);
begin
if Self.BorderStyle = bsNone then
begin
Showwindow(Findwindow('Shell_TrayWND',nil), SW_SHOWDEFAULT);
Self.Left := L;
self.Top := T;
Self.Width := W;
self.Height := H;
Self.BorderStyle := bsSizeable;
end
else
begin
Showwindow(Findwindow('Shell_TrayWND',nil), SW_HIDE);

L := Self.Left;
T := self.Top;
W := Self.Width;
H := self.Height;

Self.width:=screen.width;
Self.height:=screen.height;
Self.Top := 0;
Self.Left := 0;
Self.BorderStyle := bsNone;
end;
end;

end.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: