how do i bring a certain window to the front? example: i have the game Solitaire running, Internet Explorer, and my program open. IE is infront. i want my program to be able to bring the Solitaire window to the front by itself.
how do i bring a certain window to the front? example: i have the game Solitaire running, Internet Explorer, and my program open. IE is infront. i want my program to be able to bring the Solitaire window to the front by itself.
To bring a window to the foreground, use SetForegroundWindow:
Code:HWND solitaire = FindWindow(NULL,"Solitaire"); BOOL ret = SetForegroundWindow(solitaire);