I need to intercept the Paste operation (Ctrl+V) and modify the ClipBoard content and propagate the operation.
I have a simple Winform application. I am able to register a global hook by
RegisterHotKey(this.Handle, id, (int)KeyModifier.Control, Keys.V.GetHashCode());
Then I am able to change the Clipboard content by
Clipboard.SetText("some text");
What I need to know is how to propagate the normal Paste operation from this point onward.
For example: If my application is minimized and another application e.g. Notepad is open and is in focus. The user presses the Ctrl+V , or uses the Paste menu, then my interceptor should change the content of clipboard and those should be pasted on notepad.