I have a Delphi XE2 project with components like Label1 , BitBtn1 and Image1 . I implemented drag-and-drop form without a header by entering the following code:
private { Private declarations } procedure WMNCHitTest(var Msg: TWMNCHitTest) ; message WM_NCHitTest;
and
procedure TMainForm.WMNCHitTest(var Msg: TWMNCHitTest) ; begin inherited; if Msg.Result = htClient then Msg.Result := htCaption; end;
In my form, the events Image1.OnMouseMove and Label1.OnClick are required for my project, but they do not work. How to drag a form from the client area, except for the Image1 and Label1 areas? I can do one thing that I can use one TPanel , but it will destroy the GlassFrame and SheetOfGlass my form.
source share