是在mousedown里判断的,根据左右键的不同弹出不同的菜单;
至于你说的动态添加好友不明白什么意思,但是这些用delphi完全可以实现。

解决方案 »

  1.   

    procedure TForm1.FormMouseUp(Sender: TObject; Button: TMouseButton;
      Shift: TShiftState; X, Y: Integer);
    begin
    if button= MBLEFT then
      showmessage('left button')
    else if  button =BMRIGHT then
      showmessage('right button');end;
      

  2.   

    在mousedown中
    if button=mbleft then
      begin
        form1.show;
      end;
    else
      if button=mbright then
        begin
          form2.show;
        end;
      

  3.   

    动态添加要自己编写button1.onmouse=aa;//你的处理过程的名字