I've written a c# program which reproduces keyboard strokes programatically. My idea was to pass these keyboard strokes to another application which may have a textbox set in focus.
So in my program i want the user to select the window to which i must redirect the keyboard strokes to. For that, I want to know a method where i can wait, let user select the window to which keyboard strokes must be sent, and then the user clicks ok on my application to confirm, and then my app knows which is the window i must control by obtaining it's hwnd.
How can i do that?