Microsoft KB Archive/227043

{|
 * width="100%"|

INFO: Changing the Foreground Window in Windows 98 and Windows 2000

 * }

Q227043

-

The information in this article applies to:


 * Microsoft Win32 Application Programming Interface (API), included with:
 * the operating system: Microsoft Windows 2000
 * Microsoft Windows 98

-

SUMMARY
In Windows 98 and Windows 2000 your application can only take over the foreground under certain conditions. This article contains more specific information about these conditions. Generally speaking, if a user is actively working with another application you are not able to change the foreground window.

MORE INFORMATION
If you design an application for Windows 98 and/or Windows 2000 with the assumption that you can always take over the active window, your application may fail. If your application tries to take over the foreground under restricted conditions, your application flashes in the user's taskbar. Your application can take over the foreground under one of the following conditions:


 * Your application is the foreground window.
 * Your application activated the current foreground window.
 * Your application received the last input event.
 * There is currently no active foreground window.
 * The foreground application is being debugged.
 * The foreground lock timeout has expired.

The following condition is new for Windows 2000:


 * No menus are active.