Visual Studio 2017
I hope you all are well!
I am developing an application that will send the contents of the Clipboard (string) to any terminal (Putty, MobaXterm, etc...). I found a partial solution. It works well if you hard code the windows you want to receive the text. e.g. I hard coded for the Command Prompt windows, and it works.
IntPtr wordHandle = FindWindow(null, "Command Prompt");
What I am trying to figure out is how to do this without hard coding which windows gets the text because I do not know what app the user might use. Is there a way to get the last active windows because if I click on the button on the form the other windows loses its focus.
Any suggestions is appreciated.
Sincerely and regards,