Hi, I need to get the idle time of the device in one of my windows mobile app. I tried all the way i couldn't get it. could Any one post the code for it..
Thanks in advance.
Hi, I need to get the idle time of the device in one of my windows mobile app. I tried all the way i couldn't get it. could Any one post the code for it..
Thanks in advance.
To get it to work, you'll need the GetIdleTime() function from coredll.dll.
To access it you can use a P/Invoke command which is stated here:
[DllImport("coredll.dll")]
static extern int GetIdleTime ();
Also you should note that some devices don't support this functionality and return a MAXDWORD instead (see GetIdleTime() description in block Return Value).