I created a form and I want it to be modal, so users can't interact to what is behind this form.
I've already tried to set "FormBorderStyle" to FixedDialog, but I still can interact with contents below this window.
Am I missing something?
Thanks!!
3 Answers, 1 is accepted
0
Accepted
Stefan
Telerik team
answered on 10 Oct 2011, 08:42 AM
Hi André,
Thank you for writing.
The only thing that you have to do in order to show a form as a modal form is to call its ShowDialog method instead of the Show method:
Form1 f = newForm1();
f.ShowDialog();
I hope that you find this information helpful.
All the best,
Stefan
the Telerik team
Q2’11 SP1 of RadControls for WinForms is available for download (see what's new); also available is the Q3'11 Roadmap for Telerik Windows Forms controls.
That's the way I always understood it but that's not what's happening. Code execution does not wait for user response and returns a result of cancel even when there was no cancel button to click
When you show a form with using ShowDialog the code execution is interrupted at this point until you close the modal dialog. Note that pressing the close button in the title bar, "X", will return DialogResult.Cancel. However, you have other button that simply closes the form you can specify what DialogResult will be returned. I have attached a sample project for your reference.
I hope this information helps. If you have any additional questions, please let me know.