How to disable maximize button in delphi program?
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.
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.
Oh! I found in object inspector "BorderIcons" Just set there biMaximize from true to false!
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;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With