Private Sub HideTabs() Dim crvObject As Object For Each crvObject In Me.Report1.Controls '<-- Here is the problem in Controls If crvObject.GetType Is GetType(PageView) Then myPageView = CType(crvObject, PageView) Dim crvObjectControl As Object For Each crvObjectControl In crvObject.controls If crvObjectControl.GetType Is GetType(TabControl) Then tbcReportTab = crvObjectControl End If Next End If Next With tbcReportTab .ItemSize = New Size(0, 1) .SizeMode = TabSizeMode.Fixed .Dock = DockStyle.None .Left -= 4 .Top -= 5 .Width = .Parent.Width + 8 .Height = .Parent.Height + 9 .Anchor = AnchorStyles.Left Or AnchorStyles.Top Or AnchorStyles.Right Or AnchorStyles.Bottom .Appearance = TabAppearance.Buttons End With With tbcReportTab.TabPages(0) .BackColor = Color.FromArgb(255, 148, 154, 173) End With End Sub
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)