Detect an idle and not idle state

forum.td.development (2005-2010)
NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

Detect an idle and not idle state

Post by NewsgroupServer » 14 Dec 2009, 13:44

 Posted by:  Mati Paalmäe 

Hi,

I would like to disconnect user automatically from the database after he or
she has been idle for example 10 minutes (no input from mouse or keyboard,
no messages processed). I discovered, that with SalIdleRegisterWindow, it is
easy to send some user message and set timer with SalTimerSet, but I have no
idea how to kill this timer, if user does something with keyboard or mouse
before 10 minutetes. There is no opposite function to SalIdleRegisterWindow,
that would send message if key is pressed or mouse is moved. With
SalIdleUnregisterWindow I can only stop sending idle messages, but that's
it. Can somebody give some advice in that matter? Or maybe the only solution
is to use some DLL function from Win API? In that case which one of them?

Thanks in advance,

Mati

NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

Detect an idle and not idle state

Post by NewsgroupServer » 14 Dec 2009, 15:24

 Posted by:  Krzysztof Dorko 

Hi
I will try capture mouse movement over the window and this will trigger my
reconnect procedure
hth
Kris

NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

Detect an idle and not idle state

Post by NewsgroupServer » 23 Dec 2009, 15:04

 Posted by:  salvi_to 

An example.

CD 1.5.1

Salvi

Mati Paalmäe ha scritto:

Attachment: TestIdle.zip

Return to “td.development”

Who is online

Users browsing this forum: Ccbot [Crawler] and 0 guests