I need to detect if a user pastes text from the clipboard into a ToolStripTextBox. Therefore I’ve created a custom control which inherits from ToolStripTextBox. Then I wanted to override WndProc to catch WM_PASTE message, but I noticed that there is no WndProc to override. For the standard TextBox the described method works fine.
Any suggestion what to do to detect paste from clipboard on ToolStripTextBox?
WndProcinToolStripTextBoxseems to be out of reach. I searched a bit out of curiosity and came across that answer – https://stackoverflow.com/a/4688745/168719If using
ToolStripControlHostis not an option, there are still other clever solutions for scenarioes requiring custom handling of WndProc:http://bytes.com/topic/c-sharp/answers/279168-toolstriptextbox-right-click