Hello, I am using a winform application c#. In the application we are using Lots of UserControls and Forms.
I have a parent form, where I am using UserControl as a MainDashBoard. But for other business requirements using Forms as well. On the userControl there is a button called LoadProperties, which will load another form displaying some properties of some object.
What I want to know is that how can I find out that currently active control is UserControl or Form. Because when I am pressing the button and saying
Form1 form = new Form1();
form.MDIParent= this;
form.show();
It is loading the form, but the this.ActiveControl is giving me the button as an active control not the form.
I want to get the currently loaded form how can I do this.
Can anybody help me out...here.
Regards Shax.