In a project that I am doing, I have this error that I can not locate. It is a main form with a TabControl that loads other forms within each of its tabs. Did something similar happen to someone? Any idea that you can generate it?
-Edito:
Thanks for the reply. He repeats these three lines to me again and again (I also edit the image):
MdiTabControl.dll! MdiTabControl.TabControl.TabPageCollection.set_IndexOf (MdiTabControl.TabPage TabPage, Integer value) Line 287 + 0xd Bytes
MdiTabControl.dll! MdiTabControl.TabControl.SelectItem (MdiTabControl.TabPage TabPage) Line 1607 + 0x22 Bytes MdiTabControl.dll!
MdiTabControl.TabControl.ArrangeItems () Line 1532 + 0x46 Bytes
I'm not sure you're trying to control exactly. It occurs normally when changing screens or minimizing, in a very random way (It does not always occur). Any ideas that could produce it, could changing the control by VS itself solve it?
EDIT2: These are the only code lines where the MDItabcontrol intervenes:
Public Sub openForm(ByRef frm As Form)
Try
TabControl1.Visible = True
TabControl1.TabPages.Add(frm)
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
Private Sub resizeform(ByVal sender As System.Object)
Try
TabControl1.Width = sender.Size.Width - 20
TabControl1.Height = sender.Size.Height - ToolStrip1.Height - TabControl1.TabHeight
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
Private Sub Form1_SizeChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Resize
If Me.Visible Then
resizeform(sender)
End If
End Sub
Public Sub repintarfondo()
Try
If TabControl1.TabPages.Count = 1 Then
TabControl1.Visible = False
End If
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
As you can see, I do not have any events for those shown in the image. That's why he misses me so much.
Greetings and thanks for the help.