I have written a perl program using win32::gui to bring a particular window on the desktop to foreground (on top). For this purpose I am using “Win32::GUI::SetForegroundWindow($window);” call. This works if the current foreground window is the perl console window itself. If this is not the case and lets say the current foreground window was “MS Word” for example, the requested window does not make it to the top and only the title bar for the requested window blinks 3 times. I have also tried “Win32::GUI::BringWindowToTop($window);”. Please assist at the earliest.