feyang

feyang

  • NA
  • 2
  • 0

Modal Form Problem in Windows Forms...please help...

Apr 22 2005 6:21 AM
Hi all, I am on the way creating my first windows application... and I got problem with modal forms.. assuming I have 3 forms: Form A = the main form of the application Form B = a form with 2 button (eg: buttonB1, ButtonB2) Form C = another form with 1 button (eg: button C) from FormA I called FormB using ShowDialog() therefore FormB is a modal form. And from FormB when I clicked on Button B1 it will call MessageBox.Show("test message"), a message box appear and when you close it, FormB is still displayed on top of FormA (as expected) Now the problem start.. If from FormB I clicked ButtonB2 which open FormC (also modal form)...and then from FormC I clicked buttonC which function is MessageBox.Show("another test message"), it will show the message box (as expected).....BUT when i close the message box, FormC will also disappear and only FormB + FormA left. how do I solve this problem? I want FormC to stay open when I close the messagebox. Please note that I need the formC to be modal form (I ve tried modeless form, and it does work, but I prefer modal form) thanks for all the suggestion feyang

Answers (1)