C# Draw Custom Button on Existing Window’s TitleBar

buttonctitlebarwindow

I need to figure out how to draw a custom button next to the minimize, maximize and close buttons within the Titlebar for ALL open windows. I have seen some solutions for how this might be done for a user created form, but none for existing windows.

The end product will be a button next to the minimize button (on every window) that will allow that window to be moved and resized to a second monitor.

Best Answer

Forget about it. This is monstrously difficult, and you still wouldn't get it to work on all Windows because of security concerns - The only way to do this involves injecting code into every other process.

see this thread for a slightly longer explanation.

Modifying global system menus