Problem with TPoint in TGraphicControl lazarus / 31-LCL ---------------------------------------------------------------------- heri · 2014-06-29 10:50 Hi, Lazarus,  this is my first post and i have difficulty to understand why this TPoint not working, Code: [Select]procedure TIconTitel.MouseMove(Shift: TShiftState; X, Y: Integer); var p:Classes.TPoint; begin   inherited MouseMove(Shift, X, Y);   if not FMouseAnimate then Exit;   if FIconStyle.MouseState = msEnter then   begin      p.x:=X;      p.y:=Y;      if PtInRect(p,ClientRect) = False  then      begin         FIconStyle.MouseState:=msLeave;      end;   end; end;See, i have make var p of tpoint, then fill this var p, before i passing that to PtInRect, usually i can do this : PtInrect(TPoint(X,Y),ClientRect). Why i can not do that anymore? error is : Fatal: Syntax Error ')' expected but "," found. Am i doing wrong ? ---------------------------------------------------------------------- howardpc · 2014-06-29 11:25 Quote from: heri on June 29, 2014, 12:50:13 pmusually i can do this : PtInrect(TPoint(X,Y),ClientRect). Why i can not do that anymore? error is : Fatal: Syntax Error ')' expected but "," found. What you usually do is Code: [Select]  if not PtInRect(Point(X,Y), ClientRect) then ... i.e. Point(...) not TPoint(...) ---------------------------------------------------------------------- heri · 2014-06-29 14:14 oh stupid me, thats a silly mistake. now its done. thank you very much.