set-foreground-window

Function

Package: common-graphics

Arguments: window

This function makes the thread that created the specified window be the foreground thread, and selects the specified window. (The foreground thread is a MicroSoft term and refers to the thread (typically an application) whose windows are currently in front, and one of which will have the keyboard focus.)

This function may be needed by multi-threaded CG applications because select-window or bring-window-to-front will not reliably move a window in front of windows that were created by other threads. We say "reliably" because these functions may do this in certain versions of Windows or in certain situations, but cannot be counted upon to do so.

Newer versions of Windows (win98, win2000) allow only the current foreground thread or a thread created by the current foreground thread to set the foreground thread. In other cases, the taskbar icon corresponding to the specified window will be made to flash to notify the user that the window is asking to be brought to the foreground.

See About using multiple threads in the IDE in cgide.htm.

Common Graphics and IDE documentation is described in About Common Graphics and IDE documentation in cgide.htm.

The documentation is described in introduction.htm and the index is in index.htm.

Copyright (c) 1998-2000, Franz Inc. Berkeley, CA., USA. All rights reserved.

Created 2000.10.5.