Fórum Redimensionar o FORM #156022
27/04/2003
0
[]´s
junior
Junior#
Curtir tópico
+ 0Posts
27/04/2003
Cristiano Flores
Mude a propriedade do Form BorderStyle para bsSingle e se não quizer que o usuário maximize ou minimize o Form va a propriedade BorderIcons...
Gostei + 0
27/04/2003
Rebel_inside
Form1.Width:= 400;
Form1.Height:= 300;
Form1.Constraints.MaxWidth:= 400;
Form1.Constraints.MinWidth:= 400;
Form1.Constrains.MaxHeight:= 300;
Form1.Constraints.MinHeight:= 300;
ou também vc pode fazer o seguinte:
no evento OnConstrainedResize, defina a variável CanResize para False
procedure TForm1.ConstrainedResize(Sender: TObject, NewWidth, NewHeight: Integer; var CanResize: Boolean);
begin
CanResize:= False;
end;
e pronto!
Gostei + 0
27/04/2003
Aroldo Zanela
Para versão 7, mude a propriedade Align para alCustom e para versões anteriores, use a informação técnica abaixo:
[list:e4f91dda6a]
community.borland.com
Article #28186: How can one prevent a TForm from being moved or resized?
QUESTION:
How can one disable a TForm from being moved or resized?
ANSWER:
Place the following code in the FormCreate event:
procedure TForm1.FormCreate(Sender: TObject);
var
hMenuHandle : HMENU;
begin
hMenuHandle := GetSystemMenu(Form1.Handle, FALSE); //Get the handle of the Form
if (hMenuHandle <> 0) then
DeleteMenu(hMenuHandle, SC_MOVE, MF_BYCOMMAND); //disable moving
DeleteMenu(hMenuHandle, SC_SIZE, MF_BYCOMMAND); //disable resizing
end;
If you also want to prevent the user from minimizing and maximazing the form, in the Object Inspector, select the form you are concerned with and under the BorderIcons, set the biMinimize and biMaximize properties to False.
Last Modified: 02-JAN-02
[/list:u:e4f91dda6a]
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)