Hi,
I have a user control. The user control is used in two different forms. Everytime i drag and drop the user control on the form, a new instance is created. But i want only a single instance to be used even when it is dragged and dropped in another form.
For Eg:
My user control contains a text box. This is added in two different forms, Form1 and Form2 at design time. When i run the program, the value entered in the text box in the usercontrol added in Form1 should be reflected in the user control in Form2. Form2 should use the same instance that Form1 uses. Can i use the User control as a static class?....Can anyone help me on this?
I have a user control. The user control is used in two different forms. Everytime i drag and drop the user control on the form, a new instance is created. But i want only a single instance to be used even when it is dragged and dropped in another form.
For Eg:
My user control contains a text box. This is added in two different forms, Form1 and Form2 at design time. When i run the program, the value entered in the text box in the usercontrol added in Form1 should be reflected in the user control in Form2. Form2 should use the same instance that Form1 uses. Can i use the User control as a static class?....Can anyone help me on this?