How to determine current (active) form

I have a main form with an MDI Tabbed Manager and want to determine the active form (i.e. the form being displayed on the current tab). I need to gray-out and disable that form while some internal functions are being processed. How can I determine the current form of a Tabbed MDI Manager conrol? Thank you for your advice.

3 Replies

VR Vijayalakshmi Roopkumar Syncfusion Team September 21, 2020 01:18 PM UTC

Hi Tom, 
 
Thank you for contacting Syncfusion Support. 
 
We have checked the reported requirement that you want to notify which tab is active , for this you can use SelectedIndexChanged event of tabcontrol which has been invoked under TabControlAdded event of TabbedMDIManager . Also you can set the ActiveTabColor and InActiveTabColor to differentiate the active tabs. Please find the sample from following location: 
 
Code: 
 
 
private void TabbedMDIManager1_TabControlAdded(object sender, Syncfusion.Windows.Forms.Tools.TabbedMDITabControlEventArgs args) 
{ 
tabcontrol = args.TabControl; 
args.TabControl.ActiveTabColor = Color.Red; 
 
args.TabControl.InactiveTabColor = Color.Green; 
tabcontrol.SelectedIndexChanged += Tabcontrol_SelectedIndexChanged; 
} 
 
 
 
 
Please try this suggestion and let us know if it is helpful. 
 
Regards, 
Vijayalakshmi VR 



TK Tom Krieg September 22, 2020 06:35 AM UTC

Thank you for your reply. Let me explain what I want to do so  you can maybe help me find a way to do it.

My application has a main form which is the MDI parent and contains the TabbedMDIManager control. There is a menu button and a toolbar in a panel which flies out when the menu button is pressed (I have a timer which increases the width to make it appear like it's flying out). What I want to do is to check if a form has been opened in a MDI tab and if so, make the topmost form fade or darken and disable it until the user makes a toolbar selection and the toolbar disappears again. Then I want the topmost tab to becaome enabled again. Is there a way to darken the topmost tab as well as make the active form disabled?


VR Vijayalakshmi Roopkumar Syncfusion Team September 23, 2020 11:33 AM UTC

Hi Tom 
 
Thank you for your update. 
 
We have checked the reported query with TabbedMDIManager, but we are unable to understand what is your exact requirement.? So can you update us any screenshot or video that replicates your requirement, it would be helpful for us to provide you the prompt solution at the earliest. 
 
Regards, 
Vijayalakshmi VR 


Loader.
Up arrow icon