开发者

Get location of Windows context menu selection?

I have a Windows context menu item invoking a Windows Form via these registry keys...

HKLM\Software\Classes\*\shell\myappname
HKLM\Software\Classes\*\shell\myappname\command

But when my Windows Form is started, I want it to be located near where the context menu was invo开发者_如何学运维ked. Is there any way to do that? I think I need to get the coordinates of the Windows event and set the window location?


Your best bet is to use the MousePosition property to get the current mouse pointer position. That will, at least, reduce the distance the user needs to move the mouse to interact with your Windows Form.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜