procedure TForm1.FormCreate(Sender: TObject);
var
l: DWORD;
begin
EnableMenuItem(GetSystemMenu(Form1.Handle, LongBool(False)),
SC_CLOSE, MF_BYCOMMAND or MF_GRAYED);
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;
var
l: DWORD;
begin
EnableMenuItem(GetSystemMenu(Form1.Handle, LongBool(False)),
SC_CLOSE, MF_BYCOMMAND or MF_GRAYED);
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;
No comments:
Post a Comment