OnmouseDown事件发生在onClick之前。

解决方案 »

  1.   

    glink(飞天一狐) :你说的是什么意思?
      

  2.   

    onMouseDown事件里,你可以判断;
    if key=rightbutton//就是右键的时间做什么
    具体的参数看帮助
      

  3.   

    procedure TForm1.Button1MouseDown(Sender: TObject; Button: TMouseButton;
      Shift: TShiftState; X, Y: Integer);
    var
        k:tpoint;
    begin
        if not (button=mbleft) then exit;
        k:=button1.clienttoscreen(point(x,y));
        popupmenu1.Popup(k.x,k.y);
    end;
      

  4.   

    不好意思,在上边回答是错的,
    robinhunter(深空) 是对的
      

  5.   

    robinhunter(深空)  :看了你的代码以后,觉得这个问题其实很容易!!
    谢谢了!!!