[Lazarus] Unmoveable forms?
Luca Olivetti
luca at wetron.es
Wed Apr 16 17:14:58 CEST 2008
With delphi I used a trick involving windows messages to make a form
unmoveable:
procedure WMNCHitTest(var Msg: TWMNCHitTest);message WM_NCHitTest;
procedure WMInitMenuPopup(var Msg: TWMInitMenuPopUp);message
WM_INITMENUPOPUP;
[...]
procedure TMainFrm.WMNCHitTest(var Msg: TWMNCHitTest);
begin
inherited;
if Msg.Result=Windows.HTCAPTION then
begin
Msg.Result:= Windows.HTCLIENT
end;
end;
procedure TMainFrm.WMInitMenuPopup(var Msg: TWMInitMenuPopup);
begin
inherited;
if Msg.SystemMenu then
EnableMenuItem(Msg.MenuPopup, SC_MOVE, MF_BYCOMMAND or MF_GRAYED)
end;
Is there a way to do the same with lazarus? (and possibly in a
cross-platform way?).
I tried to crudely reset Top and Left in OnChangeBounds but the effect
is really ugly.
Bye
--
Luca Olivetti
Wetron Automatización S.A. http://www.wetron.es/
Tel. +34 93 5883004 Fax +34 93 5883007
More information about the Lazarus
mailing list