Page 1 of 1

Window transition event

Posted: Fri Mar 15, 2024 11:36 am
by Natter
Hi,

Is it possible to intercept the window transition event to the background/foreground ?

Re: Window transition event

Posted: Fri Mar 15, 2024 3:51 pm
by Antonio Linares
Dear Yuri,
Use the WM_ACTIVATE message in the application's main window procedure. This message indicates window activation changes (activating/deactivating).
Combine with the LOWORD of wParam to check the activation state (e.g., WA_INACTIVE for background).
You may need to inherit a Class TMyWindow from TWindow and implement support for WM_ACTIVATE

There are some examples in these forums showing how to inherit and modify Method HandleEvent()

https://fivetechsupport.com/forums/view ... 5e#p258349

Re: Window transition event

Posted: Fri Mar 15, 2024 7:39 pm
by Natter
Thank you, Antonio! I'll try.