Dialogs and other forms showing in Running Program List

  • Thread starter Thread starter Jon Skeet [C# MVP]
  • Start date Start date
J

Jon Skeet [C# MVP]

Our app uses pop-up dialogs reasonably frequently. All works fine, so
long as you don't start doing something else while using the app. In
particular, going to the Settings/Memory/Running Programs page.

If you do the latter, you see one entry for each of the forms/dialogs
in the app - and if you activate one that's "under" a modal dialog, you
can't do anything. This is pretty confusing to the user.

Is there any way of avoiding this behaviour?
 
Jon Skeet said:
If you do the latter, you see one entry for each of the forms/dialogs
in the app - and if you activate one that's "under" a modal dialog,
you can't do anything. This is pretty confusing to the user.

Is there any way of avoiding this behaviour?

If you set a form's Text property to an empty string, it shouldn't appear in
the Memory | Running Programs list. Just be sure to reset the form's text
when you return to it. :)
 
John T said:
If you set a form's Text property to an empty string, it shouldn't appear in
the Memory | Running Programs list. Just be sure to reset the form's text
when you return to it. :)

Yuk. I suppose that would probably work, but it's absolutely foul. I'll
suggest it to my other colleagues - from a distance!
 
Jon Skeet said:
Yuk. I suppose that would probably work, but it's absolutely foul.
I'll suggest it to my other colleagues - from a distance!

No, it's not pretty, but it's better than having your users be able to pick
any of the forms currently loaded by your app and losing their place or not
being able to get back to where they need to be.

IMO, this is a significant shortcoming of the CF. If I show a modal dialog,
my expectation is that form will be the only one listed for my application
in "Running Programs". Beyond that, if the CF absolutely must show all open
forms, then my expectation is that clicking on any of those form names in
"Running Programs" will show the current modal dialog - not the form clicked
by the user.

If anybody knows a better way of dealing with this, I'm all ears, but this
is the simplest method I've found yet.
 
John T said:
No, it's not pretty, but it's better than having your users be able to pick
any of the forms currently loaded by your app and losing their place or not
being able to get back to where they need to be.

Agreed - it's probably what we'll end up doing. We'll put appropriate
"hazardous materials" warnings around the code to keep people safe
though :)
 
Back
Top