Examples Delphi

Title: Put popup menu on the right side
First of all, you should set the Autopopup property to False and use this code on MouseDown event.
var
KorX, KorY: Ineteger;
...
procedure TForm1.Button1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
if Button=mbRight then
begin
KorY:=Form1.Top+22;
KorX:=Form1.Left+Form1.Width;
PopupMenu1.Popup(KorX, KorY);
end;
end;