Issue with Modal Dialog..

I have customized FormBase in which i have implemented a timer and that forms the base class for all the forms. I have also customized the DataGrid/DataGridView and some of the controls as textbox/maskedtextbox etc... When i set the form derived from that FormBase and set that instance of the derived form as Modal dialog as derivedForm.ShowDialog()....

It diverted from the default action i can view the derived form even over the window of other application though the derived form is an MDI child of my application.

Could anyone tell me what wrong i have had done in form base or other controls or should i have to do some more coding other than derivedForm.ShowDialog() to make it modal dialog?

[806 byte] By [ruleDWorld] at [2007-12-23]
# 1

Hi,

if you're trying to modally show the MDI child form - I don't think you can do that... MDI children are contained inside MDI container and can't be modal.

Andrej

AndrejTozon at 2007-8-30 > top of Msdn Tech,Windows Forms,Windows Forms General...
# 2
Actually i am trying to open a window form from a MDI child form as a modal dialog...? However i am not getting the result as desired. Sometimes i get the exact action as the modal dialog and sometime it get the same window over someother application..what wrong could i have done?
ruleDWorld at 2007-8-30 > top of Msdn Tech,Windows Forms,Windows Forms General...
# 3

I can't really reproduce that... Modal dialog always open on top on calling MDI child (and also its parent). Is this behaviour also happening when you run your application outside your VS IDE? Sometimes, when debugging, VS IDE might pop in the front, just before the modal dialog is shown...

Andrej

AndrejTozon at 2007-8-30 > top of Msdn Tech,Windows Forms,Windows Forms General...