473,326 Members | 2,175 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Detective work on Application.Idle event.

Hello,

I have a dozen 3rd party controls on my form. I am trying to detect
when the application is idle. But even after the mouse and the keyboard
are no longer moving, something is still triggering the Application.Idle
event. There are no Timers on the form (i removed them all after
realizing that WM_TIMER message will cause the event to fire). Anyway,
how can I figure out which control is triggering the application_idle event?

Thanks.
Nov 17 '05 #1
5 3094
"Frank Rizzo" <no****@nospam.com> wrote in message
news:OP**************@TK2MSFTNGP09.phx.gbl...
Hello,

I have a dozen 3rd party controls on my form. I am trying to detect when
the application is idle. But even after the mouse and the keyboard are no
longer moving, something is still triggering the Application.Idle event.
There are no Timers on the form (i removed them all after realizing that
WM_TIMER message will cause the event to fire). Anyway, how can I figure
out which control is triggering the application_idle event?
The Applicatiob.Idle event is not sent by any control, but is sent by
Windows when your message queue is empty. You can then use that event to
provide background processing.
Thanks.

Nov 17 '05 #2

"Frank Rizzo" <no****@nospam.com> wrote in message
news:OP**************@TK2MSFTNGP09.phx.gbl...
Hello,

I have a dozen 3rd party controls on my form. I am trying to detect when
the application is idle. But even after the mouse and the keyboard are no
longer moving, something is still triggering the Application.Idle event.
There are no Timers on the form (i removed them all after realizing that
WM_TIMER message will cause the event to fire). Anyway, how can I figure
out which control is triggering the application_idle event?

Thanks.


Try Spy++ or this Winspy available for download from
http://www.windows-spy.com/ and watch the messages posted/sent to your
visible/hidden windows.

Willy.
Nov 17 '05 #3
"Frank Rizzo" <no****@nospam.com> wrote in message
news:OP**************@TK2MSFTNGP09.phx.gbl...
Hello,

I have a dozen 3rd party controls on my form. I am trying to detect when
the application is idle. But even after the mouse and the keyboard are no
longer moving, something is still triggering the Application.Idle event.
There are no Timers on the form (i removed them all after realizing that
WM_TIMER message will cause the event to fire). Anyway, how can I figure
out which control is triggering the application_idle event?


Take a look at the API call GetLastInputInfo for idle detection - it sounds
like what you're after.

Marc
Nov 17 '05 #4
"Willy Denoyette [MVP]" <wi*************@telenet.be> wrote in message
news:eN**************@TK2MSFTNGP10.phx.gbl...

"Frank Rizzo" <no****@nospam.com> wrote in message
news:OP**************@TK2MSFTNGP09.phx.gbl...
Hello,

I have a dozen 3rd party controls on my form. I am trying to detect when
the application is idle. But even after the mouse and the keyboard are
no longer moving, something is still triggering the Application.Idle
event. There are no Timers on the form (i removed them all after
realizing that WM_TIMER message will cause the event to fire). Anyway,
how can I figure out which control is triggering the application_idle
event?

Thanks.


Try Spy++ or this Winspy available for download from
http://www.windows-spy.com/ and watch the messages posted/sent to your
visible/hidden windows.


The Application.Idle event is raised when the IMsoComponent.FDoIdle method
is called on ThreadContext. I'm not sue what does the calling, but I suspect
it's the runtime, not window messages.
Nov 17 '05 #5

"Sean Hederman" <em*******@codingsanity.blogspot.com> wrote in message
news:d2**********@ctb-nnrp2.saix.net...
"Willy Denoyette [MVP]" <wi*************@telenet.be> wrote in message
news:eN**************@TK2MSFTNGP10.phx.gbl...

"Frank Rizzo" <no****@nospam.com> wrote in message
news:OP**************@TK2MSFTNGP09.phx.gbl...
Hello,

I have a dozen 3rd party controls on my form. I am trying to detect
when the application is idle. But even after the mouse and the keyboard
are no longer moving, something is still triggering the Application.Idle
event. There are no Timers on the form (i removed them all after
realizing that WM_TIMER message will cause the event to fire). Anyway,
how can I figure out which control is triggering the application_idle
event?

Thanks.


Try Spy++ or this Winspy available for download from
http://www.windows-spy.com/ and watch the messages posted/sent to your
visible/hidden windows.


The Application.Idle event is raised when the IMsoComponent.FDoIdle method
is called on ThreadContext. I'm not sue what does the calling, but I
suspect it's the runtime, not window messages.


I know, OP's description is misleading - <something is still triggering the
Application.Idle >
It should read - something is preventing the Application.Event to be fired -
, simply because some window messages are still arriving on the message
queue(s). Using something like Spy++ makes it possible to trace these
messages and find-out their source.

Willy.

Nov 17 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Will Seay | last post by:
At the end of this message I've pasted a script we're trying to modify slightly. I don't believe it is VBscript or javascript but these are the closest groups I could find with my limited...
2
by: Chien Lau | last post by:
I have a form class that acts as a top level window. The user can open and close any number of these windows throughout the lifetime of the application. In the OnLoad, I have: ...
19
by: Frank Rizzo | last post by:
I want to log the user out when there has been a period of inactivity in the application. The key here is inactivity of the application, not the system. I know that you can retrieve the...
20
by: J-T | last post by:
We are working on an asp.net application which is a 3-tier application.I was aksed to create a component which monitors a folder and gets the file and pass them to a class library in our business...
1
by: Rob | last post by:
How can I write the following code in VB.NET : private void Form1_Load(object sender, System.EventArgs e) { // Submit to Idle event to set controls state at idle time Application.Idle += new...
4
by: Udi | last post by:
Hi All, What do you know about the Application.Idle event? When is it a good practice to use it and when should I not use it? I know it fires when the app message queue is empty, and that this...
3
by: John Salerno | last post by:
Quick question about the code below: I understand why the progress bar fills up at a steady pace when the mouse is idle over the frame; but why, when you move the mouse, does the progress bar speed...
2
by: Jack | last post by:
Sorry for the double post (also in the IIS group). We've got an ASP.Net 2.0 app running on IIS6. We kept losing sessions, and enabled health monitoring to see what was happening. This morning...
3
by: Peri | last post by:
Dear All, Can you please help me out in detecting the application idle time. I would like to lock the application if it is idle for more that 10 minutes. FYI - I have already tried...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.