Mega Code Archive

 
Categories / Delphi / Forms
 

Move form without title bar

Title: Move form without title bar Question: How to move Form if I haven't title bar? Answer: Follow the codes bellow in order to do this type TForm1 = class (TForm) private { Private Declarations } public { Public Declarations } procedure WMNCHitTest (var M: TWMNCHitTest); message wm_NCHitTest; end; var Form1: TForm1; implementation {$R *.DFM} procedure TForm1.WMNCHitTest (var M: TWMNCHitTest); begin inherited; if M.Result = htClient then M.Result := htCaption; end; end.