delphi窗口全屏時保留任務欄
我搜索了一下,見到有人說可以用
procedure TForm1.FormCreate(Sender: TObject);
begin
Self.BorderStyle := bsNone;
Self.Left := Screen.WorkAreaLeft;
Self.Top := Screen.WorkAreaTop;
Self.Width := Screen.WorkAreaWidth;
Self.Height := Screen.WorkAreaHeight;
end;
來實現;
但是我編譯時會提示WorkAreaLeft這些是未定義的字符。
請問是我哪邊弄錯了麽?請各位不吝賜教,拜謝!
[解决办法]
这确实是个十分费解的问题!因为那些属性都在Forms单元里定义了的,除非你的单元连Forms都没引用!delphi6、7、2010 都如此。
[解决办法]
property WorkAreaRect: TRect read GetWorkAreaRect; property WorkAreaHeight: Integer read GetWorkAreaHeight; property WorkAreaLeft: Integer read GetWorkAreaLeft; property WorkAreaTop: Integer read GetWorkAreaTop; property WorkAreaWidth: Integer read GetWorkAreaWidth;Form 自带的