app/form out of focus stops form-refresh !

J

jobi

Hi,

I'm trying to develop this vb.net application which gathers info.
When I start the gathering process, I refresh text-fields in the form to see
progress and to see where it gets.
This works fine as long as the application has the focus.

When I start an other application or switch to an other application (e.g.
taskmanager, outlook), the form-refresh of my application stops.
When I put the focus back to my application, the form remains blank. the
refreshes do not occur ?!?
In taskmanager the application gets status not-responding, but it does what
it's supposed to do.

What can I do to correct this ?

jobi
 
C

Cor

Hi Jobi,

That sounds not as normal behaviour, it even will be a problem because when
you refresh all the time because I thought that it is trying to get the
focus, did you do something to prevent that?

Cor
 
A

Armin Zingler

jobi said:
Hi,

I'm trying to develop this vb.net application which gathers info.
When I start the gathering process, I refresh text-fields in the
form to see progress and to see where it gets.
This works fine as long as the application has the focus.

When I start an other application or switch to an other
application (e.g. taskmanager, outlook), the form-refresh of my
application stops. When I put the focus back to my application, the
form remains blank. the refreshes do not occur ?!?
In taskmanager the application gets status not-responding, but it
does what it's supposed to do.

What can I do to correct this ?

Complain to the WinXP developers. See 3rd paragraph:

http://msdn.microsoft.com/library/e...ssagequeues/aboutmessagesandmessagequeues.asp

The developers forgot that a not responding window may still display
something even if it intentionally does not accept input. :-(((((((((((((
This ghost window "feature" can not be turned off.

Two ways around: Either use application.doevents (carefully!) or put the
work in a different thread. Both may lead to much more work than we had to
do in previous OS versions.
 
J

jobi

Complain to the WinXP developers. See 3rd paragraph:
http://msdn.microsoft.com/library/en-us/winui/winui/windowsuserinterface/win
dowing/messagesandmessagequeues/aboutmessagesandmessagequeues.asp

The developers forgot that a not responding window may still display
something even if it intentionally does not accept input. :-(((((((((((((
This ghost window "feature" can not be turned off.

Two ways around: Either use application.doevents (carefully!) or put the
work in a different thread. Both may lead to much more work than we had to
do in previous OS versions.

--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

100% on target !

I'll dig into the workarounds.

Do you have a "checklist" regarding the pitfalls for application.doevents ?

Thanks
Jobi
 
A

Armin Zingler

jobi said:
100% on target !

I'll dig into the workarounds.

Do you have a "checklist" regarding the pitfalls for
application.doevents ?

Only one item on the list: ;-)
Watch for re-entrance. Means: During processing a message, another message
may occur and be processed - this includes that the user can close the form
but your process still continues.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top