Move a border less form in Delphi
We usually use mouse to drag the windows form title bar to move the window on our desktop. But what if we required to move a border less form and that also does not have title bar. So here are some solutions to move a border less form in Delphi. There is a new way to move the form by just dragging on any point in the form itself. This is ideally suitable for those form that don't have title bar. For example, FormStyle := bsNone; Use the following code to drag on window content and you able to move the form just as you drag on title bar: type TForm1 = class(TForm) private procedure WMNCHitTest(var Msg: TWMNCHitTest); message WM_NCHitTest; end; procedure TForm1.WMNCHitTest(var Msg: TWMNCHitTest); begin inherited; if Msg.Result = htClient then Msg.Result := htCaption; end; The above code attempt to hijack the mouse event to tell the system to treat the mouse click action o...