procedure TForm1.TreeView1MouseDown(Sender: TObject;
Button: TMouseButton;
Shift: TShiftState;
X, Y: Integer);
begin
if Button = mbRight then
begin
TreeView1.GetNodeAt(X, Y);
if treeView1.selected <> nil then
pm1.popup(x,y)
else
pm2.popup(x,y)
end;
不过鼠标坐标x,y要转换成client的