If both of these are your applications then you can use any of the forms of
Inter Process Communication[
^] to communicate between them.
If the foreground app isn't yours or you can't change the code then you will need to get the handle to the edit control using PInvoke and do your thing from there - harder work but doable, plenty of examples online if you search.