 |
SwitchToThisWindow Add comment W32 Constants Translate this page |
 |
 |
|
The function is called to switch focus to a specified window and bring it to the foreground. |
 |
 |
| Code examples: |
 |
|
|
 |
 |
| Declaration: |
 |
 |
VOID SwitchToThisWindow(
HWND hWnd,
BOOL fAltTab
);
|
 |
 |
 |
| FoxPro declaration: |
 |
 |
DECLARE SwitchToThisWindow IN user32;
INTEGER hWindow,;
INTEGER fAltTab
|
 |
 |
 |
| Parameters: |
 |
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. |
 |
 |
| Return value: |
 |
| None. |
 |
 |
| My comment: |
 |
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
DECLARE INTEGER GetActiveWindow IN user32
hScreen = GetActiveWindow()
* ... later ...
DECLARE SwitchToThisWindow IN user32;
INTEGER hWindow, INTEGER fAltTab
= SwitchToThisWindow(m.hScreen, 0)
|
 |
 |
| Word Index links for the SwitchToThisWindow : |
 |
|
|
 |
 |
| Translate this page: |
 |
|
 |
 |
| • |
 |
| Created: | 2005-02-14 16:58:55 | | Modified: | 2005-02-14 17:10:34 | Visited in last 7 days: 29 |