MDI children w/progress bars not asynchronously updating
-
Background: I have a Visual Studio 2008 VB Windows application. The main window form can contain several MDI children. Each MDI child contains a progress bar to show the progress of actions which can take several minutes (the loading and parsing of large data files). Question: How I can have all of the progress bars from all of the MDI children continue to update even though only one of the MDI children is the active one? Problem Description: Say I start an action from within one MDI child (the loading and parsing a large file). The progress bar begins to slowly advance. Say I then start an action from a different MDI child. The progress bar in that MDI child begins to slowly advance but the progress bar from the first MDI child no longer increments. However, the action that I started from the first MDI child (the loading and parsing) does continue to run. If I leave the second MDI child form and click on the first MDI child form, the progress bar of the first MDI child immediately jumps to where it should be but then the second MDI child's progress bar stops advancing (although the second MDI child's action continues to be performed). Thank you for whatever suggestion you might have. Jim
-
Background: I have a Visual Studio 2008 VB Windows application. The main window form can contain several MDI children. Each MDI child contains a progress bar to show the progress of actions which can take several minutes (the loading and parsing of large data files). Question: How I can have all of the progress bars from all of the MDI children continue to update even though only one of the MDI children is the active one? Problem Description: Say I start an action from within one MDI child (the loading and parsing a large file). The progress bar begins to slowly advance. Say I then start an action from a different MDI child. The progress bar in that MDI child begins to slowly advance but the progress bar from the first MDI child no longer increments. However, the action that I started from the first MDI child (the loading and parsing) does continue to run. If I leave the second MDI child form and click on the first MDI child form, the progress bar of the first MDI child immediately jumps to where it should be but then the second MDI child's progress bar stops advancing (although the second MDI child's action continues to be performed). Thank you for whatever suggestion you might have. Jim
Can you show relevant code? From what you describe, I would add a myProgressBar.Refresh() whenever myProgressBar.Value gets changed. :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read code that is properly formatted, adding PRE tags is the easiest way to obtain that.
[The QA section does it automatically now, I hope we soon get it on regular forums as well]
-
Background: I have a Visual Studio 2008 VB Windows application. The main window form can contain several MDI children. Each MDI child contains a progress bar to show the progress of actions which can take several minutes (the loading and parsing of large data files). Question: How I can have all of the progress bars from all of the MDI children continue to update even though only one of the MDI children is the active one? Problem Description: Say I start an action from within one MDI child (the loading and parsing a large file). The progress bar begins to slowly advance. Say I then start an action from a different MDI child. The progress bar in that MDI child begins to slowly advance but the progress bar from the first MDI child no longer increments. However, the action that I started from the first MDI child (the loading and parsing) does continue to run. If I leave the second MDI child form and click on the first MDI child form, the progress bar of the first MDI child immediately jumps to where it should be but then the second MDI child's progress bar stops advancing (although the second MDI child's action continues to be performed). Thank you for whatever suggestion you might have. Jim
Have you tried using
Application.DoEvents
in your loops. Maybe not the best way to go, but it should ensure that forms get updated.