我想让主窗体最大化,并覆盖任务栏,如何能实现呢?

解决方案 »

  1.   

    设置窗体的FormStyle属性为fsMDIForm
    windowstate属性为wsMaximized
      

  2.   

    unit Unit1;interfaceuses
      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
      Dialogs, StdCtrls;type
      TForm1 = class(TForm)
        Button1: TButton;
        procedure Button1Click(Sender: TObject);
      private
        { Private declarations }
      public
        { Public declarations }
        procedure CreateParams(Var Params:TCreateParams);override;
      end;var
      Form1: TForm1;implementation{$R *.dfm}procedure TForm1.Button1Click(Sender: TObject);
    begin
        form1.Height:=Screen.Height;
        form1.Width:=screen.Width;
        form1.Top:=0;
        form1.Left:=0;
    end;
    procedure tform1.CreateParams(var Params:TCreateParams);
    begin
      inherited;
      With Params do
      begin
        wndParent:=GetDesktopwindow;
        ExStyle:=ExStyle or WS_EX_TOPMOST;
      end;
    end;
    end.