468,167 Members | 1,959 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,167 developers. It's quick & easy.

Problem with form refreshing

I'm building an application with Visual Basic 2005. The application is
multi threaded. It has a record counter on the form that counts up to
completion. It works fine throughout the process as long as it remains
in top focus. If you bring another program to focus and then go back.
The form is not refreshed until the process is complete. I am calling
me.refresh() within the main process loop. Any ideas why this may
occurr?

Thanks,
Dave

Jun 13 '06 #1
2 1469
DMartin,

You mean that you have made a multithreading process that stops the
mainprocess to do in the background another process, that stops than and
your mainprocess is going on?

Is this meant to let the user click the abort cross in the top?

Have than a look about everything that is written about the backgroundworker
in Net 2.0

http://msdn2.microsoft.com/en-us/lib...undworker.aspx

You know of course that with this you lengthen the througput time of your
proccess.

I hope this helps,

Cor
<dm*******@hotmail.com> schreef in bericht
news:11**********************@h76g2000cwa.googlegr oups.com...
I'm building an application with Visual Basic 2005. The application is
multi threaded. It has a record counter on the form that counts up to
completion. It works fine throughout the process as long as it remains
in top focus. If you bring another program to focus and then go back.
The form is not refreshed until the process is complete. I am calling
me.refresh() within the main process loop. Any ideas why this may
occurr?

Thanks,
Dave

Jun 14 '06 #2
Not exactly, the application works like this. The main process loops
over data that needs to be processed via an XML service. Three worker
threads are initialized before the loop begins. Once it starts looping
through the data, it looks to see which thread is idle and sends the
current record to the idle thread. Inside the thread, the XML request
is sent, the return data processed, and the results stored into an
access database. In the main process loop, there is record counter
thats displayed on the form the show the current progress. Every time
the record counter is incremented and stored into the textbox, the
form.refresh() command is called. As long as the form stays focused
throughout the process, the refresh works fine. If you send it to the
background and then bring it into focus again. You get not refreshing
until the process completes.

Jun 14 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Martin Ho | last post: by
1 post views Thread by James | last post: by
5 posts views Thread by Jeff | last post: by
4 posts views Thread by John Tyce | last post: by
1 post views Thread by Robert Clark | last post: by
1 post views Thread by sbettadpur | last post: by
4 posts views Thread by prodigyjohn | last post: by
reply views Thread by gcreed | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.