Using Win32 functions in Visual FoxPro Image Gallery
Window
..msdn
CloseWindow
CreateWindow
CreateWindowEx
DestroyWindow
EndTask
FindWindow
FindWindowEx
GetAncestor
GetClientRect
GetDesktopWindow
GetForegroundWindow
GetGUIThreadInfo
GetParent
GetShellWindow
GetWindow
GetWindowInfo
GetWindowPlacement
GetWindowRect
GetWindowText
GetWindowTextLength
GetWindowThreadProcessId
InternalGetWindowText
IsChild
IsIconic
IsWindow
IsWindowVisible
IsZoomed
MoveWindow
RealGetWindowClass
SetForegroundWindow
SetLayeredWindowAttributes
SetParent
SetWindowPos
SetWindowText
ShowWindow
SwitchToThisWindow
Code examples:
GetForegroundWindow
..msdn    Add comment     W32 Constants      Translate this page
The GetForegroundWindow function returns a handle to the foreground window (the window with which the user is currently working). The system assigns a slightly higher priority to the thread that creates the foreground window than it does to other threads.
Code examples:
Declaration:
HWND GetForegroundWindow(VOID);
FoxPro declaration:
DECLARE INTEGER GetForegroundWindow IN user32
Parameters:
Return value:
The return value is a handle to the foreground window. The foreground window can be NULL in certain circumstances, such as when a window is losing activation.
My comment:
See the SetForegroundWindow function for more details about foreground windows.

Visual FoxPro 9.0 introduces the AppState property, which indicates whether the Visual FoxPro application has focus or not. _SCREEN.AppState returns 0 or 1.

Using the BindEvent() function you can easily detect when your Visual FoxPro application loses or receives focus.

See also: SetFocus, GetFocus, SetForegroundWindow, GetActiveWindow.
Word Index links for the GetForegroundWindow :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2003-01-18 09:48:52
Modified: 2006-07-26 00:45:25
Visited in last 7 days: 17
User Contributed Notes:
tod@rabbitstewlounge.com | 2005-11-30 13:50:23
Just a note: VFP 9 does not have an AppState property on the _SCREEN object. It was taken out at the last minute! Instead, they added "RegWinProc", which should actually be better.

Copyright 2001-2014 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.1.68), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.197.110.151)
2.42 min.Example: 'Using Video Capture: enumerating installed capture drivers'
Google
Advertise here!