procedure TForm1.Button1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
Var P:Tpoint;
begin
GetCursorPos(P);
p:=ClientToSreen(p);
PopUpMenu1.Popup(P.x,P.y);
end;
procedure TForm1.Button1MouseMove(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
Var P:Tpoint;
begin
GetCursorPos(P);
p:=ClientToSreen(p);
PopUpMenu1.Popup(P.x,P.y);
end;