But even if he does it in a background worker thread, the documentation and
"VJ" <nonewsaddress@yahoo.com> wrote in message
news:OeO$iScZHHA.4856@TK2MSFTNGP03.phx.gbl...
>I think Bryan meant to say do the resource intensive operation in a
>thread, so in all when the thread starts, you display a busy cursor. Now
>would this take care of messagebox disappearing without DoEvents(), that
>is debatable. Depending what you do to imitate the thread... DoEvents() is
>ok to do.. just not for every screen refresh you will need it.. Sometimes
>the best options is to invalidate ( i.e just repaint a specific region)
>will do it...
>
> VJ
>
> "David Adams" <dadams@nospam-njs-ent.com> wrote in message
> news:ejkLvLcZHHA.4220@TK2MSFTNGP03.phx.gbl...
>> Hi Bryan. Wouldn't that be a bit overkill? I am simply prompting the
>> user (via MessageBox.Show) to perform an operation and running that
>> operation based on receiving the DialogResult "yes". The MessageBox
>> failing to disappear is the problem here.
>>
>> Thanks for your response.
>> Dave
>>
>>
>>
>>
>> "Bryan Phillips" <bphillips@nospam.spamcop.net.spammenot> wrote in
>> message news:OTfWQrbZHHA.348@TK2MSFTNGP02.phx.gbl...
>>> It would be a better idea to use the BackgroundWorker class or the
>>> ThreadPool class to run the operation on a separate thread.
>>>
>>> --
>>> Bryan Phillips
>>> MCSD, MCDBA, MCSE
>>> Blog:
http://bphillips76.spaces.live.com >>>
>>>
>>>
>>> "David Adams" <dadams@nospam-njs-ent.com> wrote in message
>>> news:uY7e8DaZHHA.3628@TK2MSFTNGP02.phx.gbl:
>>>
>>>> Hi,
>>>>
>>>> I have an application that recently has received a few complaints
>>>> because of
>>>> slow repainting/refreshing of certain forms. For example, I am
>>>> throwing up
>>>> a messagebox that prompts the user to perform an operation, if the
>>>> user
>>>> clicks yes, I perform the operation which is rather resource
>>>> intensive. The
>>>> problem is the messagebox that was clicked partially remains in the
>>>> background after it was clicked (refresh/repaint issue). If I use the
>>>> old
>>>> school DoEvents() it helps but am not sure if this is the best way to
>>>> solve
>>>> this problem.
>>>>
>>>> Thanks,
>>>> Dave
>>>
>>
>>
>
>