how to make CreateProcess open new process in focus and not in background [duplicate]
问题 This question already has answers here : How to bring window on top of the process created through CreateProcess (2 answers) Closed 5 years ago . I created a very simple Win program. it opens notepad and after 5 seconds it opens calc. the problem is that always the first program opens in background and not in focus (see the picture). the second program opens in focus. i've been wondering about this for a while and i can't figure out why it happens or how to open the first program in focus. I