|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Modeless Dialog Not RespondingMy UI thread creates a worker thread that performs some tasks and periodically updates the screen. All well and good, as it does this by the usual Invoke mechanism. If I want to stop the background process, I can click a button on the toolbar to stop it, as the UI is nice and responsive. At some point, the worker thread becomes idle, waiting for an external (non-user) event. At this time, I want a modeless dialog to appear, with a message inviting the user to halt the task if required. The dialog just contains a message and a stop button. The problem is, when I display the dialog, it does not refresh, so does not draw fully, and no amount of clicking on the button has any effect. My toolbar buttons still respond, so why doesn't my dialog button do anything? I suppose I could stick a DoEvents somewhere, but I have an instinctive dislike of this as a solution, as it seems to me that it frequently hides the real problem, and possibly hides bad design. Any and all suggestions welcome. TIA Charles Which thread are you displaying the dialog on? The worker thread or the
main form thread? - NuTcAsE The dialog is created from the worker thread, but if there is a way for the
worker thread to create the dialog on the UI thread then that would be good. Charles Show quoteHide quote "NuTcAsE" <rao.rit***@gmail.com> wrote in message news:1139258205.854253.202530@z14g2000cwz.googlegroups.com... > Which thread are you displaying the dialog on? The worker thread or the > main form thread? > > - NuTcAsE >
Automatic type casting?
Crash in VB.NET 2005 Windows Shell Integration: how? Visual Basic 2005 CreateFile Read mail from exchange 2003 Automated Refactoring w/ CodeDom and VBCodeProvider... Insert related tables into database. Problems with FileAccess and PcitoreBox Outlook Add-In: msoControlEdit: Textbox loses text when losing focus File is busy |
|||||||||||||||||||||||