Fórum Como desativar o botão fechar do form #466293
08/01/2014
0
Abs.,
Thiago
Curtir tópico
+ 0Posts
08/01/2014
Maicon Wagner
procedure TForm1.FormCreate(Sender: TObject);
var
hwndHandle : THANDLE;
hMenuHandle : HMenu;
begin
hwndHandle := Self.Handle;
if (hwndHandle <> 0) then begin
hMenuHandle := GetSystemMenu(hwndHandle, FALSE);
if (hMenuHandle <> 0) then
DeleteMenu(hMenuHandle, SC_CLOSE, MF_BYCOMMAND);
end;
end;
Gostei + 0
09/01/2014
Leonardo Xavier
Gostei + 0
09/01/2014
Thiago
Entendi e funcionou!
Vlw
procedure TForm1.FormCreate(Sender: TObject);
var
hwndHandle : THANDLE;
hMenuHandle : HMenu;
begin
hwndHandle := Self.Handle;
if (hwndHandle <> 0) then begin
hMenuHandle := GetSystemMenu(hwndHandle, FALSE);
if (hMenuHandle <> 0) then
DeleteMenu(hMenuHandle, SC_CLOSE, MF_BYCOMMAND);
end;
end;
Gostei + 0
09/01/2014
Thiago
Vlw pela dica também!
Abs.,
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)