Any suggestions on how to create a Photoshop style floating tool palette? I've tried several ideas such as:
- Creating a child window, setting its FormBorderStyle to FixedToolWindow and showing it as a child of the main form, but the tool window steals focus from the main form.
- Creating a child window as above and using various combinations of flags passed to CreateParams but still run into the same focus issues.
- Creating the tool palette as a UserControl and and "floating it" by setting its parent to be the desktop (via the user32#SetParent function), but then it's no longer a child of the main form and does not minimize/restore with the main form.
I'm thinking #3 is the way to go and I'm going to have to write the code to keep the tool palette window state in sync with the main form as well as implement the ability to drag the palette around, draw borders, etc...
Suggestions on better ways to tackle this?