Changeset 219


Ignore:
Timestamp:
May 11, 2020, 10:06:08 PM (18 months ago)
Author:
chronos
Message:
  • Fixed: Apply correctly fullscreen mode to MainScreen.
Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Back.pas

    r194 r219  
    7575  end else begin
    7676    WindowState := wsNormal;
    77     Width := StartDlg.Width + 16;
    78     Height := StartDlg.Height + 16;
    79     Left := StartDlg.Left - 8;
    80     Top := StartDlg.Top - 8;
     77    BoundsRect := Bounds(StartDlg.Left - 8, StartDlg.Top - 8,
     78      StartDlg.Width + 16, StartDlg.Height + 16);
    8179  end;
    8280end;
  • trunk/LocalPlayer/Term.pas

    r207 r219  
    287287    Offscreen: TBitmap;
    288288    OffscreenUser: TForm;
    289     procedure CreateParams(var p: TCreateParams); override;
    290289    procedure Client(Command, NewPlayer: integer; var Data);
    291290    procedure SetAIName(p: integer; Name: string);
     
    33983397
    33993398{ *** main part *** }
    3400 
    3401 procedure TMainScreen.CreateParams(var p: TCreateParams);
    3402 begin
    3403   inherited;
    3404   if FullScreen then begin
    3405     p.Style := $87000000;
    3406     BorderStyle := bsNone;
    3407     BorderIcons := [];
    3408   end;
    3409 end;
    34103399
    34113400procedure TMainScreen.FormCreate(Sender: TObject);
     
    78057794procedure TMainScreen.FormShow(Sender: TObject);
    78067795begin
    7807   Timer1.Enabled := true;
    7808   Left := 0;
    7809   Top := 0;
     7796  if FullScreen then begin
     7797    WindowState := wsMaximized;
     7798    BorderStyle := bsNone;
     7799    BorderIcons := [];
     7800  end else begin
     7801    WindowState := wsMaximized;
     7802    BorderStyle := bsSizeable;
     7803    BorderIcons := [biSystemMenu, biMinimize, biMaximize];
     7804  end;
     7805  Timer1.Enabled := True;
    78107806end;
    78117807
  • trunk/Start.pas

    r209 r219  
    694694    Location := Point((Screen.Width - 800) * 3 div 8,
    695695      Screen.Height - Height - (Screen.Height - 600) div 3);
    696     Left := Location.X;
    697     Top := Location.Y;
     696    BoundsRect := Bounds(Location.X, Location.Y, Width, Height);
    698697
    699698    r0 := CreateRectRgn(0, 0, Width, Height);
     
    708707    DeleteObject(r0); // causes crash with Windows 95
    709708  end else begin
    710     Left := (Screen.Width - Width) div 2;
    711     Top := (Screen.Height - Height) div 2;
     709    BoundsRect := Bounds((Screen.Width - Width) div 2,
     710      (Screen.Height - Height) div 2, Width, Height)
    712711  end;
    713712end;
Note: See TracChangeset for help on using the changeset viewer.