PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Framework Forms
Re: How to update main form when child form closes?
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Framework Forms
Re: How to update main form when child form closes?
![]() |
Re: How to update main form when child form closes? |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
Try calling Application.DoEvents (or is it Application.ProcessMessages -
can't remember right now?) after closing the dialog box. This allows for the repaint events to be processed by the main form. "Mike Litzkow" <mlitzkow@buildstuff.com> wrote in message news:85B642B6-C114-4164-9A7E-8FB8D0F0B371@microsoft.com... > My windows desktop app has a main form which puts up an "Hourglass" cursor, calls "Update", and then calls a routine in another class to do some fairly extensive processing. This works fine except when the called routine runs into a problem. Then it will put up a dialog box asking the user if it's OK to fix the problem. This causes the "hourglass" cursor to change back to a normal "pointer" for the duration of the new dialog. That's fine too, but when the dialog finishes the cursor remains a "pointer" cursor and the main form doesn't redraw where the dialog box was. I think I need to call Update in the main form at this point, but how should I do it? Passing a reference to the main form all the way down to the point where the error is handled and the dialog box is shown will be quite akward. Likewise, passing an event from the error handler back up to the code in the Main Form looks akward too. Is there another way? |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

