Forcing FoxPro Window to Always Remain on TopID: Q108623 2.5x 2.6x 3.00 WINDOWS kbinterop The information in this article applies to:
SUMMARYThe sample code below forces the main FoxPro window to remain on top of all other windows. It demonstrates how to use the FOXTOOLS.FLL library commands to call the SetWindowPos() Microsoft Windows application programming interface (API) function.
MORE INFORMATIONThe program first declares some compile-time constants (to improve readability) and loads the FOXTOOLS.FLL library that is supplied with FoxPro for Windows. It then retrieves the handle to the main FoxPro window using a call to MainHWND(), which is a function residing in the FOXTOOLS.FLL library. It then calls the SetWindowPos() function and passes the handle to the main FoxPro window and the HWND_TOPMOST constant to make sure that window always remains on top.
In order to remove the "always on top" attribute from the main FoxPro
window, the program above could be modified to make the CallFn() line
use the constant HWND_NOTOPMOST instead of HWND_TOPMOST as the third
argument.
REFERENCESMicrosoft Windows Software Development Kit, "Programmer's Reference, Volume 2: Functions," page 892 FOXTOOLS.WRI located in the C:\FOXPROW\GOODIES\FOXTOOLS subdirectory Additional reference words: VFoxWin 3.00 FoxWin 2.50 2.50a 2.50b 2.60 2.60a SDK KBCategory: kbinterop KBSubcategory: FxprgFoxtools
|
Last Reviewed: May 22, 1998 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |