Article ID: 108623
Article Last Modified on 9/30/2003
*** Define compile-time constants
#DEFINE HWND_TOPMOST -1
#DEFINE HWND_NOTOPMOST -2
#DEFINE SWP_NOSIZE 1
#DEFINE SWP_NOMOVE 2
*** Load FoxTools library
SET LIBRARY TO SYS(2004)+"FOXTOOLS"
*** Register the Windows API function
setwin=RegFn("SetWindowPos","IIIIIII","I")
*** Obtain handle to main FoxPro window
handle=mainhwnd()
*** Call SetWindowPos() API function
=CallFn(setwin,handle,HWND_TOPMOST,0,0,0,0,SWP_NOMOVE+SWP_NOSIZE)
*** Release the FoxTools library
SET LIBRARY TO
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.
Additional query words: VFoxWin FoxWin 2.50 2.50a 2.50b 2.60 2.60a SDK
Keywords: kbcode KB108623