Hi,
Is it possible to get the FW application exit event to the foreground ?
Window in the foreground
- Antonio Linares
- Site Admin
- Posts: 42597
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 40 times
- Been thanked: 86 times
- Contact:
Re: Window in the foreground
This way you put a window foreground
SetForeGroundWindow( oWnd:hWnd )
Next, do you want to close it ?
SetForeGroundWindow( oWnd:hWnd )
Next, do you want to close it ?
Re: Window in the foreground
I don't need to bring the application to the foreground. I just wanted to know if my app is in the foreground or not ?
- Antonio Linares
- Site Admin
- Posts: 42597
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 40 times
- Been thanked: 86 times
- Contact:
Re: Window in the foreground
Code: Select all | Expand
if GetForeGroundWindow() == oWndMain:hWnd
MsgInfo( "you app is in foreground" )
endif
https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getforegroundwindow
Re: Window in the foreground
Thank you, Antonio!
Is it possible to intercept the moment when the window is in the foreground ? For example, my application is in the background. In the foreground is some other application. I am closing this application. As a result, my application comes to the fore. This is the moment I need to catch
Is it possible to intercept the moment when the window is in the foreground ? For example, my application is in the background. In the foreground is some other application. I am closing this application. As a result, my application comes to the fore. This is the moment I need to catch
- Antonio Linares
- Site Admin
- Posts: 42597
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 40 times
- Been thanked: 86 times
- Contact:
Re: Window in the foreground
It seems as EVENT_SYSTEM_FOREGROUND is the event to check
Lets look for some examples...
Lets look for some examples...
- Antonio Linares
- Site Admin
- Posts: 42597
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 40 times
- Been thanked: 86 times
- Contact:
Re: Window in the foreground
I'll try using EVENT_SYSTEM_FOREGROUND. Or I'll just check GetForegroundWindow() == oWndMain:hWnd in the timer