Author Topic: How to detect that application has lost focus ?  (Read 2833 times)


  • Full Member
  • ***
  • Posts: 177
How to detect that application has lost focus ?
« on: October 02, 2013, 10:59:37 am »

I've an issue with one of my application running under a Symbol MC3190 device (Windows CE 6.5.3) :
A confirmation form is displayed over my application when the "power" button is pressed. User has the following choices :
- suspend my device
- switch the battery
- cancel the operation

I have several issues after resuming the device or after cancelling this operation :
- my application is displayed in front of the "Top menu bar" and in front of the SIP button.

I've tried to use this handler but they doesn't seems to trigger on Wince :
Code: [Select]

I don't want to create a timer and force my taskbar and SIP button to be displayed in front again.

Is there another way to detect that my application has lost focus ?
Lazarus 1.6.2
fpc 3.0.0
delphi berlin


  • Full Member
  • ***
  • Posts: 223
Re: How to detect that application has lost focus ?
« Reply #1 on: November 06, 2013, 05:11:51 am »
I'd tried a lot of them, but only Timer and OnActivate had results.
Lazarus 1.8.4 + FPC 2.6.4 x86 (rebuild) and Lazarus 2.0, Windows 7 x64, unless otherwise specified