procedure TForm1.FormMouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Single);
var
p : TPointF ;
begin
if (ssRight in Shift) then begin
p := Form1.ClientToScreen(PointF(X,Y));
PopupMenu1.Popup(p.X,p.Y);
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
PopupMenu1.Popup(Screen.MousePos.X,Screen.MousePos.Y);
end;