Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to disable Window dragging

129 views
Skip to first unread message

*

unread,
Jan 4, 2000, 3:00:00 AM1/4/00
to
I'm making a program, which may not be dragged around the screen, I have
disabled the system icon but I can still drag the windows by clicking the
blue bar and here is the question how can I prevent this??
Thanks in advance
Morten Hansen

Benjamin

unread,
Jan 4, 2000, 3:00:00 AM1/4/00
to

Johannes Berg

unread,
Jan 4, 2000, 3:00:00 AM1/4/00
to
make the form borderless.....

johannes

Petr Vones

unread,
Jan 5, 2000, 3:00:00 AM1/5/00
to
> I'm making a program, which may not be dragged around the screen, I have
> disabled the system icon but I can still drag the windows by clicking the
> blue bar and here is the question how can I prevent this??

This way:

procedure TForm1.FormCreate(Sender: TObject);
begin
DeleteMenu(GetSystemMenu(Handle, False), SC_MOVE, MF_BYCOMMAND);
end;

Petr.


Peter Below

unread,
Jan 6, 2000, 3:00:00 AM1/6/00
to
> I'm making a program, which may not be dragged around the screen, I have
> disabled the system icon but I can still drag the windows by clicking the
> blue bar and here is the question how can I prevent this??

Morten,

add a handler for the WM_NCHITTEST message:

private
{ Private-Deklarationen }
Procedure WMNCHitTest( Var msg: TWMNCHitTest ); message WM_NCHITTEST;

Procedure TForm1.WMNCHitTest( Var msg: TWMNCHitTest );
Begin
inherited;
If msg.result = HTCAPTION Then
msg.result := HTNOWHERE;
End;


Peter Below (TeamB) 10011...@compuserve.com)
No replies in private e-mail, please, unless explicitly requested!

Sent using Virtual Access 5.00 - download your freeware copy now
http://www.atlantic-coast.com/downloads/vasetup.exe

0 new messages