Windows API

ID #1007

How to know if user leave the application?

It will be usefull to know if application is in focus:
hForWnd       UNSIGNED
ForThreadID   ULONG
ForProcessID  ULONG
CODE
hForWnd = GetForegroundWindow()
ForThreadID = GetWindowThreadProcessId(hForWnd, ForProcessID)
IF ForProcessID = GetCurrentProcessID() 
  ! Application is in focus
END

Tags: application, user, focus

Related entries:

Last update: 2007-07-17 10:26
Author: Aleksey Timkov
Revision: 1.0

Digg it! Print this record Send to a friend Show this as PDF file
Propose a translation for Propose a translation for
Please rate this entry:

Average rating: 0 out of 5 (0 Votes )

completely useless 1 2 3 4 5 most valuable

You can comment on this entry