-
Modal Form Woes
Folks,
I'm stuck on a problem at the moment where I'm displaying a modal warning screen to users based on data gathered from a database table. A query is kicked off by a timer event firing at regular intervals, and if some data is out of bounds the warning screen is displayed to the user.
The problem I am having arises from using a pop-up\context menu in the app which is launched when the user right clicks on, for example, a list view or tree view etc.
However, within my main project everything works ok, but I have other components used in my app which are dll components and when I call the popup menu within these applications and the warning screen appears at the same time, the application appears to freeze. But, clicking on the application in the task bar, seems to return control to the application and the application becomes usable again.
Also, the forms within the application are MDI child forms(obviously apart from the modal warning form), the Dll forms are not .
Has anyone encountered a problem like this? Does anyone know how to work around this?
All advice and help is gratefully received - thanks in advance!
Morrislgn
-
Re: Modal Form Woes
Instead of displaying a modal form you could just display it on top of the main form, ie.
Code:
PopupWarning.Show , MainForm
This lets user continue working in the other forms while the warning message is still displayed on top of everything, so you can be sure the user sees it. Atleast this wouldn't halt any code execution and thus it shouldn't interrupt handling of window messages (that probably don't get to their final destination due to the modality of the warning form).
-
Re: Modal Form Woes
Thanks dude!
That seems to do the job well, thanks very much for your help!!
-
Re: Modal Form Woes
Now that we've helped you, you can help us by pulling down the Thread Tools menu and clicking the Mark Thread Resolved button which will let everyone know that you have your answer. Also if someone has been particularly helpful, or even particularly unhelpful, you have the ability to affect a their forum "reputation" by rating their post.