Let’s say I have 2 MS WORD windows, first one is on the left side of the screen, the other one on the right side. So they are both visible. One of them is the main process and the other one is an instance of the main. When I open another unrelated window and maximize it, MS WORD windows are both on background. In that position, when I use SetForegroundWindow() function for both of the MS WORD windows in a for loop (by giving to the function the handles of two windows), it only brings the main window of MS WORD windows to the front, but I want both of them to come to the front. Thank you.
Share
Solved it! First you need to call SetForegroundWindow() function and after that call SetWindowPos() function with these parameters:
Thanks all!