PC Review


Reply
Thread Tools Rate Thread

app/form out of focus stops form-refresh !

 
 
jobi
Guest
Posts: n/a
 
      11th Dec 2003
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


 
Reply With Quote
 
 
 
 
Cor
Guest
Posts: n/a
 
      11th Dec 2003
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

> 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.



 
Reply With Quote
 
Armin Zingler
Guest
Posts: n/a
 
      11th Dec 2003
"jobi" <(E-Mail Removed)> schrieb
> 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/en...sagequeues.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



 
Reply With Quote
 
jobi
Guest
Posts: n/a
 
      11th Dec 2003
I guess Arim Zingler's reply describes my problem.

Thanks
"Cor" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>
> > 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.

>
>



 
Reply With Quote
 
jobi
Guest
Posts: n/a
 
      11th Dec 2003
> Complain to the WinXP developers. See 3rd paragraph:
>
>

http://msdn.microsoft.com/library/en...rinterface/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


 
Reply With Quote
 
Armin Zingler
Guest
Posts: n/a
 
      11th Dec 2003
"jobi" <(E-Mail Removed)> schrieb
>
> 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.


--
Armin

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

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Me.Form.Refresh resets the form focus? =?Utf-8?B?TWF1cnkgTWFya293aXR6?= Microsoft Access 4 20th Jul 2007 10:00 PM
OnClick Event in Form STOPS WORKING when Form is Made a Sub-Form kev100 via AccessMonster.com Microsoft Access Form Coding 10 24th Jul 2006 08:53 PM
Form Status Controls Stop Updating if Form Loses Focus =?Utf-8?B?R2VvcmdlIE1jS2Vl?= Microsoft Dot NET Framework Forms 1 21st Dec 2005 06:13 PM
Closing modeless form causes parent form to disappear (or lose focus). Marcus Microsoft Dot NET Framework Forms 1 3rd Jan 2004 03:30 PM
drawing focus rectengle for owner drawn window form(like real one player form o) hassan azizi Microsoft Dot NET Framework Forms 1 4th Aug 2003 10:20 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:01 PM.