Recent

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

swierzbicki

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

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]
      Application.OnDeactivate:=@GlobalConfig.OnDeactivate;
      Application.OnRestore:=@GlobalConfig.OnRestore;   


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
wince/win32/win64
delphi berlin

bambamns

  • 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