Windows with Delphi Windows API (94) Windows Filesystem (41) Windows Forms (69) Windows Graphics (38)
Exchange Links About this site Links to us 
|
Why always drag a window by its title bar?
This article has not been rated yet. After reading, feel free to leave comments and rate it.
If you want to give your users the ability to move your application by dragging it
by clicking anywhere on your application window (see Windows 3.1's Clock application),
here's what you can do:
 | |  | |
private
procedure WMNCHitTest(var Msg : TWMNCHitTest);
message wm_NCHitTest;
..
procedure TForm1.WMNCHitTest(var Msg : TWMNCHitTest);
begin
inherited;
if htClient = Msg.Result then
Msg.Result := htCaption;
end; | |  | |  |
Comments:
|