I'm having hard time looking for a solution. :(
How can i add tabs without duplicating it on the tabpages.
I'm using list view to add tabs to the tabcontrol.
These are my codes:
Public Class frmMain
Private Sub treeviewMain_NodeMouseDoubleClick(sender As Object, e As System.Windows.Forms.TreeNodeMouseClickEventArgs) Handles treeviewMain.NodeMouseDoubleClick
Dim page As Integer = tabMain.TabPages.Count
Dim tabpage As New TabPage
Dim id As Integer
tabpage.Text = treeviewMain.SelectedNode.Text.ToString()
Select Case tabpage.Text
Case "Return"
tabMain.TabPages.Add(tabpage)
Dim frm As New frmReturn
frm.TopLevel = False
frm.Parent = tabMain.TabPages(page)
frm.Show()
Case "Borrow"
tabMain.TabPages.Add(tabpage)
Dim frm As New frmBorrow
frm.TopLevel = False
frm.Parent = tabMain.TabPages(page)
frm.Show()
id = 2
Case "OPAC"
tabMain.TabPages.Add(tabpage)
Dim frm As New frmOPAC
frm.TopLevel = False
frm.Parent = tabMain.TabPages(page)
frm.Show()
End Select
End Sub
End Class
THANK YOU!