I am using a tab control on my mdi parent forms. when i open a child window i hide the tab control. but i want the tabcontrol to show itself on child close event. but i cant figure out the code. any help will be great

Recommended Answers

All 2 Replies

Add a form_closing event to you child form.
From there you can make the tab control visible while the child form is closing.

Protected Sub childForm_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
    If e.Cancel = False Then
        Me.Parent.<tabcontrol>.Visible = True
    End If
End Sub

I get an error message "XML elements cannot be selected from type system.windows.forms.form"

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.