Delphi鼠标左键点击Button弹出快捷菜单Popupmenu
procedure TForm1.SpeedButton4Click(Sender: TObject); begin PopupMenu2.Popup(Mouse.CursorPos.X-30,Mouse.CursorPos.Y+12);
end;
在光标所在位置弹出菜单;
procedure TForm1.Label1Click(Sender: TObject); var Point: TPoint; begin GetCursorPos(Point); PopupMenu1.Popup(Point.X,Point.Y); end;
|
|