all this is currently working but i would like to know what can i do so maintain focus on the application that i opened even if i click somewhere else, also i would like to know how to put the cursor.position on a Relative position of the application that i opened and NOT the main form or even the windows client position.

thx in advance and let me know what i can change in the above code and help me out if you can

Tyvm for your help, i was having problems with Handle, and that solved my problem.

I now need to work on the "maintain focus" if i click somewhere else, so i guess i need to work on the buttonGO_Click part now to make sure that the program that i'm opening sill have high priority even if the mouse moves outside.

Do i need to work with threads for this (because threads is something that I never worked with)?

If i don't require threads for this do I need to manually code so that the FindWindow allways checks for that window and works inside it? or there's an alternate or propper way to do this?

Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.