
26.08.2009, 09:08
|
Активный
|
|
Регистрация: 29.03.2009
Сообщения: 300
Репутация: 94
|
|
Код:
...
type
TForm1 = class(TForm)
private
{ Private declarations }
procedure WMSYSCOMMAND(var Msg: TMessage); message WM_SYSCOMMAND;
procedure WMWINDOWPOSCHANGING(var Msg: TMessage); message WM_WINDOWPOSCHANGING;
public
{ Public declarations }
end;
....
procedure TForm1.WMSYSCOMMAND(var Msg: TMessage);
begin
if (Msg.WParam <> SC_MAXIMIZE) and
(Msg.WParam <> SC_MINIMIZE) and
(Msg.WParam <> SC_CLOSE) then inherited;
end;
procedure TForm1.WMWINDOWPOSCHANGING(var Msg: TMessage);
var
wp: PWindowPos;
begin
wp := PWindowPos(Pointer(Msg.LParam));
wp^.flags := wp^.flags or SWP_NOMOVE;
Msg.LParam := Integer(wp);
inherited;
end;
|