|
Why always drag a window by its title bar? |
Views: 1405
|
Thread Tools | Rate Thread |
#1
|
|||
|
|||
Why always drag a window by its title bar?
The most common way to move an application window is to drag it by its title (or caption) bar. If you want to give your users the ability to move your application by dragging it by clicking anywhere on your application window, here's what you can do:
procedure TForm1. WMNCHitTest( var Msg : TWMNCHitTest ); begin inherited; { fool windows by telling it that it's in our caption area although it's in our client area } if( htClient = Msg.Result )then Msg.Result := htCaption; end; |