Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable maximize button in delphi program?

How to disable maximize button in delphi program?

like image 678
sanjeri Avatar asked Feb 23 '10 05:02

sanjeri


People also ask

How do I disable maximize in Visual Basic?

In Visual Studio, First Select the Form, go to the properties and Click on Maximize Box , set it to False.It will hide the Maximize Button. Save this answer. Show activity on this post.

Where is Maximise button?

Maximize Buttons The maximize button in Windows is the middle button with the square. In the Mac, the green plus sign (+) is officially the "zoom button," and it expands the window to a pre-set size, not the entire screen.


2 Answers

Oh! I found in object inspector "BorderIcons" Just set there biMaximize from true to false!

like image 55
sanjeri Avatar answered Sep 20 '22 22:09

sanjeri


Here is another trick if you want to do it using code only.

procedure TForm1.FormCreate(Sender: TObject);
var
  l: DWORD;
begin

  // hide minimize and maximise buttons
  l := GetWindowLong(Self.Handle, GWL_STYLE);
  l := l and not(WS_MINIMIZEBOX);
  l := l and not(WS_MAXIMIZEBOX);
  l := SetWindowLong(Self.Handle, GWL_STYLE, l);

end;
like image 43
jimsweb Avatar answered Sep 21 '22 22:09

jimsweb