Windows Forms Inheritance and Multiple instances of form at runtime in MDI application
Greetings,
I am new to C# and I am using VC# 2008 Express Edition. I am working on an application prototype where I have the below classes/forms created
1. Windows Form - BaseFormTypical_01 has a collection of controls including a DataGridView, a set of radio buttons and other form controls.
2. Inherited Forms from BaseFormTypical_01.
3. MDI application with menu items calling the inherited forms.
4. Database connections to 6 different principal databases controlled by selecting their respective Menu Items.
I am facing below issue(s) during runtime.
1. Since the form is designed to allow comparison between 2 schemas on the principal database, i launch two instances of the form from the MDI menu. I control the schema selection using the 2 radio buttons on the form. My intention is to hold one instance against schema A and the second instance against schema B. However, I found that the query would not execute when I changed the principal data connection until I switched the radio buttons on both the forms. Is this due to the way windows form inheritance works or am I missing something while implementing the inheritance.
Note that I have multiple such forms executing different queries and may/may not need such comparison.
Kindly advise how I can deal with this scenario where I want to ensure that the two instances are somehow independent of each other at runtime.