eeyo
asked on
VB.NET Form Modal vs. Non-modal vs. Owner
I have Form1 and Form2 which should be accessible to the user independently. A button on Form1 will open Form1A (should be modal to Form1 only) and open Form2 (accessible while Form1A is open):
I have tried using a mixture of owner and show vs. showdialog, but if the Form1A is modal, it also blocks access to Form2. I need for the user to be able access both Form1A and Form2 at the same time. When open, Form1A should of course prevent access to Form1. I realize that I could probable add code to Form1A in the FormClosing event, but I also want the code to be cleaner, and Form1A could be opened from various other forms as well. Any thoughts on how to accomplish this?
Form2.Show() 'Should be independent from Form1 and Form2
Using frm As New Form1A
frm.Owner = Me
frm.ShowDialog()
'When Form1A closed, do something with user entered data
End Using
I have tried using a mixture of owner and show vs. showdialog, but if the Form1A is modal, it also blocks access to Form2. I need for the user to be able access both Form1A and Form2 at the same time. When open, Form1A should of course prevent access to Form1. I realize that I could probable add code to Form1A in the FormClosing event, but I also want the code to be cleaner, and Form1A could be opened from various other forms as well. Any thoughts on how to accomplish this?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER