Posted by Johan on April 18, 2005
In Reply to: Disable dragging / resizing Delphi form posted
by Maxwell on April 18, 2005
Disable dragging and resizing the Delphi form by temporarily
changing its BorderStyle to bsNone :)
procedure Form1.DoTheLoop;
var
SavedBorderStyle: TFormBorderStyle;
begin
SavedBorderStyle := BorderStyle;
BorderStyle := bsNone;
// Do loop
// ...
BorderStyle := SavedBorderStyle;
end;
A tip to improve the appearance of the form when Borderstyle is set to bsNone.
Drop a TShape on the form, set the property Align to alClient and set Brush.Style to bsClear.
Now, when the form's BorderStyle is set to bsNone at runtime, you will still see
a thin borderline -- the border of the TShape!
|