何が最良の方法は、デルフィの応用を完全に完全表示順の設定ができます。

StackOverflow https://stackoverflow.com/questions/14451

  •  08-06-2019
  •  | 
  •  

質問

何が最良の方法は、デルフィの応用(デ2007年win32こちら)行きにて完全画面で、削除申請の国境をwindowsタスクバー?

いようなものかIEなう場合がございますのでご注意下F11.

いることは実行時にオプションのユーザーは、設計時間の決定により自分の中でとても大きな財産です。

としての受け答え

BorderStyle := bsNone; 

したの一部について教えてください。妙にいたっ E2010 Incompatible types: 'TFormBorderStyle' and 'TBackGroundSymbol' エラーが使用するラインの他、そのた bsNone 定義した.

この使いいただける:

BorderStyle := Forms.bsNone;
役に立ちましたか?

解決

でも、常に連携して取り組んできた。るようになることは、少しシンプルにした方がよ...

procedure TForm52.Button1Click(Sender: TObject);
begin
  BorderStyle := bsNone;
  WindowState := wsMaximized;
end;

他のヒント

Google検索して、以下の追加方法:

もう私がRoddyのメソッドは最初に)

手動で記入し、画面の から:約Delphi)

procedure TSomeForm.FormShow(Sender: TObject) ;
var
   r : TRect;
begin
   Borderstyle := bsNone;
   SystemParametersInfo
      (SPI_GETWORKAREA, 0, @r,0) ;
   SetBounds
     (r.Left, r.Top, r.Right-r.Left, r.Bottom-r.Top) ;
end;

バリエーションをテーマによるRoddy

FormStyle := fsStayOnTop;
BorderStyle := bsNone;
Left := 0;
Top := 0;
Width := Screen.Width;
Height := Screen.Height;

にすえ (ピーター下記からTeamB)

private  // in form declaration
    Procedure WMGetMinMaxInfo(Var msg: TWMGetMinMaxInfo);
      message WM_GETMINMAXINFO;

Procedure TForm1.WMGetMinMaxInfo(Var msg: TWMGetMinMaxInfo);
  Begin
    inherited;
    With msg.MinMaxInfo^.ptMaxTrackSize Do Begin
      X := GetDeviceCaps( Canvas.handle, HORZRES ) + (Width - ClientWidth);
      Y := GetDeviceCaps( Canvas.handle, VERTRES ) + (Height - ClientHeight
);
    End;
  End;

procedure TForm1.Button2Click(Sender: TObject);
Const
  Rect: TRect = (Left:0; Top:0; Right:0; Bottom:0);
  FullScreen: Boolean = False;
begin
  FullScreen := not FullScreen;  
  If FullScreen Then Begin
    Rect := BoundsRect;
    SetBounds(
      Left - ClientOrigin.X,
      Top - ClientOrigin.Y,
      GetDeviceCaps( Canvas.handle, HORZRES ) + (Width - ClientWidth),
      GetDeviceCaps( Canvas.handle, VERTRES ) + (Height - ClientHeight ));
  //  Label2.caption := IntToStr(GetDeviceCaps( Canvas.handle, VERTRES ));
  End
  Else
    BoundsRect := Rect;
end; 

に形 onShow イベントなどのコード:

  WindowState:=wsMaximized;

とに OnCanResize この:

  if (newwidth<width) and (newheight<height) then
    Resize:=false;

最形 非表示のタイトルバー.の最大化ラインからメモリがいWindowState財産であります。

ものもありま この ですが、そうなっています。

procedure TForm1.FormCreate(Sender: TObject) ;
begin
   //maximize the window
   WindowState := wsMaximized;
   //hide the title bar
   SetWindowLong(Handle,GWL_STYLE,GetWindowLong(Handle,GWL_STYLE) and not WS_CAPTION);
   ClientHeight := Height;
end;

編集:こちらは完全に、たとえば、"全画面"や"回復"です。いさいがいおいちじてきみまも別パーツに少し手続き最大限の説明できるように大幅に圧縮されない。

unit Unit1;

interface

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

type
  TForm1 = class(TForm)
    btnGoFullScreen: TButton;
    btnNotFullScreen: TButton;
    btnShowTitleBar: TButton;
    btnHideTitleBar: TButton;
    btnQuit: TButton;
    procedure btnGoFullScreenClick(Sender: TObject);
    procedure btnShowTitleBarClick(Sender: TObject);
    procedure btnHideTitleBarClick(Sender: TObject);
    procedure btnNotFullScreenClick(Sender: TObject);
    procedure btnQuitClick(Sender: TObject);
  private
    SavedLeft : integer;
    SavedTop : integer;
    SavedWidth : integer;
    SavedHeight : integer;
    SavedWindowState : TWindowState;
    procedure FullScreen;
    procedure NotFullScreen;
    procedure SavePosition;
    procedure HideTitleBar;
    procedure ShowTitleBar;
    procedure RestorePosition;
    procedure MaximizeWindow;
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.btnQuitClick(Sender: TObject);
begin
  Application.Terminate;
end;

procedure TForm1.btnGoFullScreenClick(Sender: TObject);
begin
  FullScreen;
end;

procedure TForm1.btnNotFullScreenClick(Sender: TObject);
begin
  NotFullScreen;
end;

procedure TForm1.btnShowTitleBarClick(Sender: TObject);
begin
  ShowTitleBar;
end;

procedure TForm1.btnHideTitleBarClick(Sender: TObject);
begin
  HideTitleBar;
end;

procedure TForm1.FullScreen;
begin
  SavePosition;
  HideTitleBar;
  MaximizeWindow;
end;

procedure TForm1.HideTitleBar;
begin
  SetWindowLong(Handle,GWL_STYLE,GetWindowLong(Handle,GWL_STYLE) and not WS_CAPTION);
  ClientHeight := Height;
end;

procedure TForm1.MaximizeWindow;
begin
  WindowState := wsMaximized;
end;

procedure TForm1.NotFullScreen;
begin
  RestorePosition;
  ShowTitleBar;
end;

procedure TForm1.RestorePosition;
begin
  //this proc uses what we saved in "SavePosition"
  WindowState := SavedWindowState;
  Top := SavedTop;
  Left := SavedLeft;
  Width := SavedWidth;
  Height := SavedHeight;
end;

procedure TForm1.SavePosition;
begin
  SavedLeft := Left;
  SavedHeight := Height;
  SavedTop := Top;
  SavedWidth := Width;
  SavedWindowState := WindowState;
end;

procedure TForm1.ShowTitleBar;
begin
  SetWindowLong(Handle,gwl_Style,GetWindowLong(Handle,gwl_Style) or ws_Caption or ws_border);
  Height := Height + GetSystemMetrics(SM_CYCAPTION);
  Refresh;
end;

end.

どのようプロジェクトへの協賛を始め、小形内のMainformのようでしたMDIアプリ., な頭痛!(注:の回答をこのページを中心としたこ働いているので、なぜ私液こちら)

private
{ Private declarations }
  StickyAt: Word;
  procedure WMWINDOWPOSCHANGING(Var Msg: TWMWINDOWPOSCHANGING); Message M_WINDOWPOSCHANGING;
  Procedure WMGetMinMaxInfo(Var msg: TWMGetMinMaxInfo); message WM_GETMINMAXINFO;

後...

    procedure TForm2.WMWINDOWPOSCHANGING(var Msg: TWMWINDOWPOSCHANGING);
    var
      A, B: Integer;
      iFrameSize: Integer;
      iCaptionHeight: Integer;
      iMenuHeight: Integer;
    begin

      iFrameSize := GetSystemMetrics(SM_CYFIXEDFRAME);
      iCaptionHeight := GetSystemMetrics(SM_CYCAPTION);
      iMenuHeight := GetSystemMetrics(SM_CYMENU);

      // inside the Mainform client area
      A := Application.MainForm.Left + iFrameSize;
      B := Application.MainForm.Top + iFrameSize + iCaptionHeight + iMenuHeight;

      with Msg.WindowPos^ do
      begin

        if x <= A + StickyAt then
          x := A;

        if x + cx >= A + Application.MainForm.ClientWidth - StickyAt then
          x := (A + Application.MainForm.ClientWidth) - cx + 1;

       if y <= B + StickyAt then
         y := B;

       if y + cy >= B + Application.MainForm.ClientHeight - StickyAt then
         y := (B + Application.MainForm.ClientHeight) - cy + 1;

      end;
end;

います。

Procedure TForm2.WMGetMinMaxInfo(Var msg: TWMGetMinMaxInfo);
var
  iFrameSize: Integer;
  iCaptionHeight: Integer;
  iMenuHeight: Integer;
Begin
  inherited;
  iFrameSize := GetSystemMetrics(SM_CYFIXEDFRAME);
  iCaptionHeight := GetSystemMetrics(SM_CYCAPTION);
  iMenuHeight := GetSystemMetrics(SM_CYMENU);
  With msg.MinMaxInfo^.ptMaxPosition Do
  begin
    // position of top when maximised
    X := Application.MainForm.Left + iFrameSize + 1;
    Y := Application.MainForm.Top + iFrameSize + iCaptionHeight + iMenuHeight + 1;
  end;
  With msg.MinMaxInfo^.ptMaxSize Do
  Begin
     // width and height when maximized
     X := Application.MainForm.ClientWidth;
     Y := Application.MainForm.ClientHeight;
  End;
  With msg.MinMaxInfo^.ptMaxTrackSize Do
  Begin
     // maximum size when maximised
     X := Application.MainForm.ClientWidth;
     Y := Application.MainForm.ClientHeight;
  End;
  // to do: minimum size (maybe)
End;

確認する必要がありま形に位置するpoDefaultPosOnly.

Form1.Position := poDefaultPosOnly;
Form1.FormStyle := fsStayOnTop;
Form1.BorderStyle := bsNone;
Form1.Left := 0;
Form1.Top := 0;
Form1.Width := Screen.Width;
Form1.Height := Screen.Height;

試作品Win7x64.

Hm.の対応を記憶していを扱うこの約8年前に私はコードゲームです。るデバッグやすく、使いのデバイスのコンテキストは通常、Delphiのソースのためのフルスクリーン表示になります。

点は、DirectXは稼働可能な他のデバイスコンテキストフルスクリーンに割り当てる。

を差し上げるまでにアプリ"true"フルスクリーン機能、ウェブサイトの広告を表DirectX図書館のためのDelphiでしょうを含む必要なセット。

私の場合、社会生活の解決には:

procedure TFormHelper.FullScreenMode;
begin
  BorderStyle := bsNone;
  ShowWindowAsync(Handle, SW_MAXIMIZE);
end;

う:

Align = alClient    
FormStyle = fsStayOnTop

このいわいのモニター

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top