One of the forms I use with the TabbedMdiManager, should only have a maximum of one tab. When the use chooses to open this form from the menu, I want to check to see if it is already open and if it is, rather than open another form of like it, I want to make it the active tab.
I assume I can check the tabs collection on the tabgroup but I'm not sure how.
stokara said: I am concerned with another form, form2, which appears as an addional tab on the main form, and I want to prevent multiple instances of form2 from being created.
I have several child forms which can be viewed from the main form.
When the app starts it always opens one child of form1, of which many instances are allowed. I am concerned with another form, form2, which appears as an addional tab on the main form, and I want to prevent multiple instances of form2 from being created.
I recommend checking the MdiChildren property of the parent form, to see if you already a child form. If you don't, then there's no tab, so you'd create a new instance. If you do find one there, then activate that child form, which will activate the tab as well.