m_contextMenu = new ContextMenuExtension(); m_contextMenu.Title = "AutoCAD Tools"; MenuItem m_menuitem = new MenuItem("First Tool"); m_menuitem.Click += new EventHandler(CallbackOnClick); m_contextMenu.MenuItems.Add(m_menuitem); Autodesk.AutoCAD.ApplicationServices.Application.AddDefaultContextMenuExtension(m_contextMenu); 自已再写一个CallbackOnClick事件就OK了 |