TabControl. My ChildForm is frmPurchaseEntry. When the user clicks on a particular Menu option a new TabPage is created and
the child form is displayed within the TabPage.
I am using the following code in the MenuClick event of the MDIForm (frmMainMenu) :
|
Everything is OK upto this. But I am unable to remove the TabPage when the ChildForm is closed. The following command only closes the ChildForm, but the empty TabPage still remains.
|
I know the syntax to remove a TabPage is
|
But Im unable to access the TabControl of MDIForm from the ChildForm. I tried to use Public modifier for the TabControl, but still it is not exposed from the ChildForm.
How can I remove AND dispose a particular TabPage (with a particular Tab Text) from the ChildForm???
Thank you.
Lalit Kumar Barik
Scott KnakePosted Jul 21, 2009, 7:22 AM