Below is an attempt to make a button that will remove all tabpages, then add them back through their indexes.
StartPage is the starting index, and Current Pages is the total tabpages.
How should this rewritten to work properly, or what line(s) of code should be added to the [Add TabPage With The Index of c]
comment.
StartPage is the starting index, and Current Pages is the total tabpages.
How should this rewritten to work properly, or what line(s) of code should be added to the [Add TabPage With The Index of c]
comment.
Code:
Public Class Form1
Dim StartPage As Integer = 0
Dim CurrentPages As Integer = 6
Try
For Each T As TabPage In TC1.TabPages
TC1.TabPages.Remove(T)
Next
Do Until StartPage = CurrentPages
StartPage += 1
'' [Add TabPage With The Index of StartPages Integer]
Loop
If StartPage = CurrentPages Then
StartPage = 0
End If
Catch
End Try
End Class