mousecapture

Disable mouse capturing by Button

不打扰是莪最后的温柔 提交于 2019-12-24 13:52:13
问题 I create custom ContextMenuStrip with Button in it: ContextMenuStrip _contextMenu = new ContextMenuStrip(); _contextMenu.Items.Add(new ToolStripMenuItem("Item")); _contextMenu.Items.Add(new ToolStripControlHost(new Button())); When I open this context menu and move mouse over 'Item' it is highlighted. But after I clicked Button and then move mouse over 'Item' again it isn't highlighted anymore. Looks like Button captures mouse. How can I avoid this or release capturing after Button clicking?

Cocoa - capture mouse just like screencapture utility

非 Y 不嫁゛ 提交于 2019-12-12 04:18:50
问题 I am trying to find the answer to a topic which has basically driven me insane. Is there a way to capture the mouse pointer much like Apple's screencapture utility works? What I am trying to do requires me to draw a clear window that does not activate my app but instead overlays everything, including the dock. The only software I have seen do this is screencapture by utilizing command+shift+4. I have tried creating a non-activating NSPanel but it doesn't work with cursor rects unless my app