I have a 'startup' Mdi child form which I want to alw***ay open. Therefore, users can close all other Tabbed MDI child forms but not the 'startup' form. How can I do this? The application is in vb.net. Thank you in advanced.
Patrick
Hello,
Handle the TabbedMDIManager's TabClosing event. Inside here, do a check on a property that is unique to the "startup" form using the event arg's Tab property. If the tab being closed contains your startup form then cancel the event. However, you'll want to make sure that you handle the FormClosing event for the MDI parent form and set e.Cancel to false or else you won't be able to exit out of your application.
Private Sub UltraTabbedMdiManager1_TabClosing(ByVal sender As System.Object, ByVal e As Infragistics.Win.UltraWinTabbedMdi.CancelableMdiTabEventArgs) Handles UltraTabbedMdiManager1.TabClosing If e.Tab.TextResolved = "Start" Then e.Cancel = True End IfEnd Sub
Private Sub Form1_FormClosing(ByVal sender As System.Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles MyBase.FormClosing e.Cancel = FalseEnd Sub