OK, not sure if the Subject says it well, but what I have is a PaletteSet that is displayed during a command in order to show some data as well as containing options for the command. Once it is displayed I set the focus back to the Editor so the user can select objects. When the cursor moves over the Palette focus is automatically switched so the mouse can select the options thereon, then switches back to the Editor as the cursor moves off the Palette. This all works fine & dandy.
What I am trying to do is allow the user to use the keyboard to 'press' buttons on the Palette form via a Hotkey approach. The entire time that the Editor has focus, the Editor.GetEntity() method is in use to allow the user to select an object.
Can anyone point me in the right direction for such a task?
Solved! Go to Solution.
Well, I've adapted some HotKey code from HERE that almost works. It was written for a Form whereas my form is actually a UserControl on a PaletteSet. So even though the HotKey is defined, I used CTRL + S since I want to save something, when run that key combination does nothing (normally this would bring up the Save Drawing dialog). I think that this is due to the Palette vs Form and I cannot see how to get the WndProc event to fire with the PaletteSet.
I will put together a small sample project, hopefully someone can lend a hand.
The solution turned out to be simple enough. Instead of using the PaletteSet.Handle to pass to the constructor I used the UserControl.Handle and all works as desired. I posted the sample project to theSwamp's .NET forum.