How to force dialog redraw when it regains focus?
-
Hi all, I have a large processing job that is taking an hour or two. I have a simple form that contains a statusbar panel that informs the user with progress. At the moment the update is a text string but I might move to a progress bar in the future. However, the main question is this: If I click elsewhere (outside the program) and then return focus to the form, the statusbar text does not redraw and update. It ends up stuck on wherever it was when I left it. Furthermore, it even does this if I simply move the form slightly without losing focus. Can someone advice what to do to maintain the updates? TIA Jerry
-
Hi all, I have a large processing job that is taking an hour or two. I have a simple form that contains a statusbar panel that informs the user with progress. At the moment the update is a text string but I might move to a progress bar in the future. However, the main question is this: If I click elsewhere (outside the program) and then return focus to the form, the statusbar text does not redraw and update. It ends up stuck on wherever it was when I left it. Furthermore, it even does this if I simply move the form slightly without losing focus. Can someone advice what to do to maintain the updates? TIA Jerry
Are you doing your processing in the same thread as the GUI runs in? It sounds like it. If so, you have two options - you can either break out your processing to another thread, or you can simply make sure you call Application.DoEvents() regularly. Hope that helps
-
Are you doing your processing in the same thread as the GUI runs in? It sounds like it. If so, you have two options - you can either break out your processing to another thread, or you can simply make sure you call Application.DoEvents() regularly. Hope that helps