0
I need to detect the Left and Top value of the Form (in real time) by dragging and displaying the values in Spinedits (Sedtx and Sedty).
I am using the code below, but without success:
private
{ Private declarations }
procedure WMNCHitTest(var M: TWMNCHitTest);
Procedure:
procedure TFrmMain.WMNCHitTest(var M: TWMNCHitTest);
begin
inherited;
if M.Result = htCaption then
//Ao arrastar o Form atualiza os SpinEdits
SEdtX.Value := FrmMain.Left;
SEdtY.Value := FrmMain.Top;
end;
What should I change?
I tried to put in the Form Mousedown, but it doesn’t work.
– lukkicode