dragging whole form via a panel and middle mouse button

Giganews Newsgroups
Subject: dragging whole form via a panel and middle mouse button
Posted by:  kemal.gulol (kemal.gul…@hotmail.com)
Date: Tue, 24 Jun 2008

for example I have a panel on form.
and I wantto drag the whole form via middle mouse button (mimics middle
mouse button as pressed form caption )
but have no luck with this codes.

(it only works with left button.
but when I put some additional lines (like if (Button = mbMiddle)  ) to
control wheter middle mouse button pressed or not it does not functioning.

-------------------------------
ReleaseCapture;
//SendMessage(self.Handle,  WM_LBUTTONDOWN, 0, 0);
SendMessage(self.Handle, WM_SYSCOMMAND, 61458, 0);

-------------------------------

any idea ?
thanks

Replies