views:

36

answers:

1

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 invoked. Is there any way to do that? I think I need to get the coordinates of the Windows event and set the window location?

+3  A: 

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.

Jim Lamb
Agreed. StartPosition = Manual.
Hans Passant
Reluctantly accepting this...wishing there was a better way :)
RichAmberale