Fórum Não deixar o usuário mudar o form de lugar #172141
29/07/2003
0
Olá, como faço para não deixar o usuário mudar o form de lugar.
grato
tuiobecker
grato
tuiobecker
Tuiobecker
Curtir tópico
+ 0
Responder
Posts
29/07/2003
Aroldo Zanela
Colega,
Para versões 6 e 7, mude a propriedade Align para alCustom e para versões anteriores, use a informação técnica abaixo:
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
Para versões 6 e 7, mude a propriedade Align para alCustom e para versões anteriores, use a informação técnica abaixo:
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
Responder
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)