winforms - How to open a form from a Dialog (modal form) and make it accesible even if didn't close the dialog -


i have form (form1) open modal. in form there button where, when user presses it, opens new form (form2).

i have problem form1 modal , form2 in background, , cannot until close form1. how can stuff in form2 without closing form1?

i need form1 modal, cannot change that. tried set parent of form2 when calling it:

form2.parent = form1 form2.show() 

but gave me error:

"form cannot added controls collection has valid mdi parent. parameter name: value"

so tried this:

form1.ismdicontainer = true 

but puts form2 inside form1. tried hiding form1 , showing again when form2 closed, fails.

platform: windows forms using vb.net.

the problem having was setting parent of form2 mainform, deleted part , form2 opens on top of form1.

another solution works open form2 modal. of course act different, depends on want.


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -