By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,666 Members | 1,784 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,666 IT Pros & Developers. It's quick & easy.

Displaying a form as top, and modal, but without ShowDialog

P: n/a
Can anyone advise how to display a form on top, and modal, without using
ShowDialog??

Thanks
Nov 16 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Paul,

Why do you not want to use ShowDialog? If the form is modal, then I
don't see what the difference is.

What are you trying to do?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Paul Aspinall" <pa**@aspy.co.uk> wrote in message
news:i_******************@fe3.news.blueyonder.co.u k...
Can anyone advise how to display a form on top, and modal, without using
ShowDialog??

Thanks

Nov 16 '05 #2

P: n/a
Hi

The reason is...
I have the user entering into a form, which must be modal (which I was using
ShowDialog to display), simila to a 'Wizard' style.

However, when the user makes an invalid entry, I want to display a
MessageBox, to inform them of a certain condtion....

this results in another modal form, being shown from a modal form......

When the user clicks 'OK' on the message, both 'modal' forms disappear, ie.
the message, and the 'wizard'.

Any ideas how to stop this?

Thanks
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:ea**************@TK2MSFTNGP12.phx.gbl...
Paul,

Why do you not want to use ShowDialog? If the form is modal, then I
don't see what the difference is.

What are you trying to do?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Paul Aspinall" <pa**@aspy.co.uk> wrote in message
news:i_******************@fe3.news.blueyonder.co.u k...
Can anyone advise how to display a form on top, and modal, without using
ShowDialog??

Thanks


Nov 16 '05 #3

P: n/a
Paul,

Can you show a piece of code that does this? I've whipped up a small
example, and tried to show a modal form, then a messagebox, and regardless
of whether or not I set the parent of the modal form or the dialog box, that
is not the behavior I get.

I think that there is something else going on.

If you could show an example, it would be helpful.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Paul Aspinall" <pa**@aspy.co.uk> wrote in message
news:ov******************@fe1.news.blueyonder.co.u k...
Hi

The reason is...
I have the user entering into a form, which must be modal (which I was
using ShowDialog to display), simila to a 'Wizard' style.

However, when the user makes an invalid entry, I want to display a
MessageBox, to inform them of a certain condtion....

this results in another modal form, being shown from a modal form......

When the user clicks 'OK' on the message, both 'modal' forms disappear,
ie. the message, and the 'wizard'.

Any ideas how to stop this?

Thanks
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote
in message news:ea**************@TK2MSFTNGP12.phx.gbl...
Paul,

Why do you not want to use ShowDialog? If the form is modal, then I
don't see what the difference is.

What are you trying to do?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Paul Aspinall" <pa**@aspy.co.uk> wrote in message
news:i_******************@fe3.news.blueyonder.co.u k...
Can anyone advise how to display a form on top, and modal, without using
ShowDialog??

Thanks



Nov 16 '05 #4

P: n/a
Paul,

I've recreated the example as an MDI app, which has one child form, and
then shows a modal dialog, and then shows a messagebox, and I don't get the
result that you do. I should note that I am running on .NET 2.0, so the
problem could have been fixed.

However, I would ask the following:

- When creating the MDI child form, are you setting the MdiParent property
to the MDI parent form (I assume yes on this one).
- When showing the modal dialog, are you passing the MDI child form as the
owner parameter in the call to ShowDialog?
- When calling the static Show method on the MessageBox, are you passing the
modal dialog as the owner parameter?

I have done all of the above, and could not reproduce the error.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Paul Aspinall" <pa**@aspy.co.uk> wrote in message
news:ov******************@fe1.news.blueyonder.co.u k...
Hi

The reason is...
I have the user entering into a form, which must be modal (which I was
using ShowDialog to display), simila to a 'Wizard' style.

However, when the user makes an invalid entry, I want to display a
MessageBox, to inform them of a certain condtion....

this results in another modal form, being shown from a modal form......

When the user clicks 'OK' on the message, both 'modal' forms disappear,
ie. the message, and the 'wizard'.

Any ideas how to stop this?

Thanks
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote
in message news:ea**************@TK2MSFTNGP12.phx.gbl...
Paul,

Why do you not want to use ShowDialog? If the form is modal, then I
don't see what the difference is.

What are you trying to do?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Paul Aspinall" <pa**@aspy.co.uk> wrote in message
news:i_******************@fe3.news.blueyonder.co.u k...
Can anyone advise how to display a form on top, and modal, without using
ShowDialog??

Thanks



Nov 16 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.