呵呵。老兄是想做诸如IE的后退那样的向下按钮吧。不能直接用mouse的X,Y。用这个函数:ClientToScreen转换一下。

解决方案 »

  1.   

    哎呀,想的和我一模一样,来大哥告诉你(说着,走过来),源代码在此,过目:
    procedure ....;
    var:lc_mouse:tmouse;
    begin
    lc_mouse:=tmouse.create;
    popupmenu1.popup(lc_mouse.cursorPos.x,lc_mouse.cursorPos.y);
    lc_mouse.free;
    end;不用考虑,我已经行通了,呵呵,快点加分!给我。
      

  2.   

    哎呀,想的和我一模一样,来大哥告诉你(说着,走过来),源代码在此,过目:
    procedure ....;
    var:lc_mouse:tmouse;
    begin
    lc_mouse:=tmouse.create;
    popupmenu1.popup(lc_mouse.cursorPos.x,lc_mouse.cursorPos.y);
    lc_mouse.free;
    end;不用考虑,我已经行通了,呵呵,快点加分!给我。
      

  3.   

    GetCursorPos(p);//p:TPoint;
    PopupMemu1.Popup(p.x,p.y);
      

  4.   

    procedure Button1.onClick
    var Rect:TRect;
    begin
      Rect:=Button1.BoundRect;
      MapWindowPoints(Handle,0,Rect,2);
      Popup.Popup(Rect.Left,Rect.Bottom);
    end;
      

  5.   

    procedure TForm1.Button1Click(Sender: TObject);
    var Rect:TRect;
    begin
      rect:=button1.BoundsRect;
      MapWindowPoints(Handle,0,Rect,2);
      PopupMenu1.Popup(Rect.Left,Rect.Bottom);
    end;