Please,
if you can help, thanks in advance.
I tried to control the MainForm position (top and left) through the procedure bellow.
Problem is : If the form move a pixel the app return Access violation, what am I doing wrong ?
{procedure WindowPosChanged(var Msg: TLMessage); message LM_WINDOWPOSCHANGED;}
procedure TMainForm.WindowPosChanged(var Msg: TLMessage);
var
vx, vy: integer;
P: ^WindowPos;
begin
P := Pointer(Msg.LParam);
Vx := P^.x;
Vy := P^.y;
StatusBar1.Panels[0].Text := IntToStr(Vx);
StatusBar1.Panels[1].Text := IntToStr(Vy);
end;
(Lazarus 1.0.6 - Windows7)