Hello – I’m trying to implement a non modal form that is also top most.
Basically – I want the form to remain open and available while the user interacts with the main form of the application.
I thought I could achieve this with .TopMost = True and also .Show instead of .ShowDialog.
But I cannot seem to make this work. Am I doing something wrong?
Here is what I’ve found:
form.Show seems to behave like form.ShowDialog – they both show the form in a modal way – the user is unable to interact with the main form.
form.ShowModalMask = true | false – doesn’t seem to matter – it always shows the mask (dims the underlying main form).
Any suggestions on how I can achieve this?
Thanks in advance…
Matthew
Hi Matthew,
From what you say above, it’s not easy to understand your exact use case. I think it would be easier if you attach a sample that shows the problem you describe.
Concerning modal/modeless windows on Wisej, there is a very simple rule:
This has some consequences:
In order to use true modeless windows, all windows in the chain must be modeless – no ShowDialog() on parent window, nor on grand-parent window, nor even on child windows, grand-child windows, etc
When you come to think about it, it makes no sense to have a modal showing a modeless. I can’t think of a single use case where you are working on a modal window and need to use a modeless window.
If you are using a Page application, you can open modal and modeless as child windows. If your application is a Form based application like MDI, in order to use modeless windows, your Program.cs file can’t ShowDialog() the main window but rather Show().
Please have a look at MDI Example at GibHub
I hope that helps. If not, please attach a sample.
Thanks Tiago – the nuance of not being able to show a non modal form from a modal form is what was tripping me up. I am going to find another way to implement the requirement.
Thanks for your help.
Please login first to submit.