Group: Window - Library: user32
Accessing Adobe Reader 7.0 main menu from VFP application
How to control Adobe Reader 9.0 (SDI mode) from VFP application
VOID SwitchToThisWindow(
HWND hWnd,
BOOL fAltTab
);
DECLARE SwitchToThisWindow IN user32;
INTEGER hWindow,;
INTEGER fAltTab
hWnd [in] Handle to the window being switched to.
fAltTab [in] A TRUE for this parameter indicates that the window is being switched to using the Alt/Ctl+Tab key sequence.
None.
Requires Windows XP/2K. You can access this function by using LoadLibrary and GetProcAddress combined in Microsoft Windows versions prior to Windows XP.
MSDN: This function is deprecated and not intended for general use. It is recommended that you do not use it in new programs because it might be altered or unavailable in subsequent versions of Windows.
To bring the FoxPro window to the front, in VFP version 7+:
DECLARE SwitchToThisWindow IN user32;
INTEGER hWindow, INTEGER fAltTab
= SwitchToThisWindow(_Screen.HWND, 0)
In older VFP versions:
* save the value on app start<font color=#0000a0>
DECLARE INTEGER GetActiveWindow IN user32
hScreen = GetActiveWindow()<font color=#00a000>
* ... later ...<font color=#0000a0>
DECLARE SwitchToThisWindow IN user32;
INTEGER hWindow, INTEGER fAltTab
= SwitchToThisWindow(m.hScreen, 0)