Page 1 of 1

Active Form

PostPosted: Wed May 26, 2021 3:30 pm
by SBarnes
How can you make a given form the active tab in the mdi programmatically?

Re: Active Form

PostPosted: Wed May 26, 2021 3:59 pm
by pricerc
SBarnes wrote:How can you make a given form the active tab in the mdi programmatically?


Can't you just set focus to it?

Re: Active Form

PostPosted: Tue Jul 06, 2021 2:15 pm
by Mike.Sheen
SBarnes wrote:How can you make a given form the active tab in the mdi programmatically?


Call the Activate method of the form you want to make the active tab.

Forms can be found by looking at the MdiChildren property of the Manager.MDIParentForm,

In VB:
Code: Select all
Manager.MDIParentForm.MdiChildren(1).Activate

will set the second tab (it's a zero based index) to be the selected (active) tab.

Re: Active Form  Topic is solved

PostPosted: Tue Jul 06, 2021 3:29 pm
by SBarnes
Ryan's solution also works here