Welcome! Log In Create A New Profile

Advanced

[WD26] How detect mouse activity outside the application

Posted by Michael Drechsel 
[WD26] How detect mouse activity outside the application
September 27, 2021 08:47PM
Hi,

how can I detect if the user use the mouse or not in windev, even the user has minimized the application or in background.

I need it for the present status (like in ms-teams) (green, yellow and red)

regards Michael
Re: [WD26] How detect mouse activity outside the application
September 28, 2021 07:07AM
Hi Michael,

I think that you have to use calls to the Windows API which is responding to all Windows events.

Kind regards,
Guenter Predl
office@windev.at
Re: [WD26] How detect mouse activity outside the application
September 28, 2021 02:02PM
and which ? :-)

regards Michael
Re: [WD26] How detect mouse activity outside the application
September 28, 2021 05:11PM
Hi Michael,

from here
[docs.microsoft.com]

to
[docs.microsoft.com]

WDAPI should provide the necessary support to your programming
[docs.microsoft.com]

Kind regards,
Guenter Predl
office@windev.at
Attachments:
open | download - Ashampoo_Snap_Dienstag, 28. September 2021_17h09m22s_001_.png (65.9 KB)
Re: [WD26] How detect mouse activity outside the application
September 29, 2021 09:09AM
Hi Guenter,

thx.

I found also a possible solution in the french forum which detects the last activity (keyboard or mouse)

LASTINPUTINFO is Structure
cbSize is 4-byte unsigned int
dwTime is int
END


MesInformations is LASTINPUTINFO
MesInformations:cbSize =Dimension(MesInformations)

IF API("user32","GetLastInputInfo",&MesInformations) <>0 THEN
Info("The user has not had any activity on the computer since "+MesInformations:dwTime+"ms")
END

regards Michael



Edited 1 time(s). Last edit at 09/29/2021 09:43AM by Michael Drechsel.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: