Goodday great Programmers in the World
Am not advanced upto this extent and have to ask for help
I need a help and codes to solve this.
I have 5 columns of 11 textboxes each on my form
the textboxes are generated with this code
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'column 1 textboxes
'Dim tbarray(10) As TextBox
For u As Integer = 0 To 10
Dim tbox As TextBox = New TextBox
With tbox
.Parent = Me
.Left = (u Mod 5) * 45 + 100
.Top = (u \ 5) * 25 + 6
.Width = 30
.Visible = True
.Tag = u
.Text = ""
.MaxLength = 2
.Name = "textboxfrom_" & u
Me.Controls.Add(tbox)
.Location = New Point(1148, 40 + (u * 30))
End With
Next
'end of column 1 textboxes
'column 2 textboxes
'Dim tbarray(10) As TextBox
For u As Integer = 0 To 10
Dim tbox As TextBox = New TextBox
With tbox
.Parent = Me
.Left = (u Mod 10) * 45 + 100
.Top = (u \ 10) * 25 + 6
.Width = 30
.Visible = True
.Tag = u
.Text = ""
.MaxLength = 2
.Name = "textboxfrom_" & u
Me.Controls.Add(tbox)
.Location = New Point(1192, 40 + (u * 30))
End With
Next
'end of column 2 textboxes
'column 3 textboxes
'Dim tbarray(10) As TextBox
For u As Integer = 0 To 10
Dim tbox As TextBox = New TextBox
With tbox
.Parent = Me
.Left = (u Mod 10) * 45 + 100
.Top = (u \ 10) * 25 + 6
.Width = 30
.Visible = True
.Tag = u
.Text = ""
.MaxLength = 2
.Name = "textboxfrom_" & u
Me.Controls.Add(tbox)
.Location = New Point(1236, 40 + (u * 30))
End With
Next
'end of column 3 textboxes
'column 4 textboxes
'Dim tbarray(10) As TextBox
For u As Integer = 0 To 10
Dim tbox As TextBox = New TextBox
With tbox
.Parent = Me
.Left = (u Mod 10) * 45 + 100
.Top = (u \ 10) * 25 + 6
.Width = 30
.Visible = True
.Tag = u
.Text = ""
.MaxLength = 2
.Name = "textboxfrom_" & u
Me.Controls.Add(tbox)
.Location = New Point(1280, 40 + (u * 30))
End With
Next
'end of column 4 textboxes
'column 5 textboxes
'Dim tbarray(10) As TextBox
For u As Integer = 0 To 10
Dim tbox As TextBox = New TextBox
With tbox
.Parent = Me
.Left = (u Mod 10) * 45 + 100
.Top = (u \ 10) * 25 + 6
.Width = 30
.Visible = True
.Tag = u
.Text = ""
.MaxLength = 2
.Name = "textboxfrom_" & u
Me.Controls.Add(tbox)
.Location = New Point(1324, 40 + (u * 30))
End With
Next
'end of column 5 textboxes
End Sub
Please i need a code to generate all the possible combination of the numbers a user types into the textboxes
i have two images (Panel3: the textboxes where added during design time)
image2: the textboex were added using the code i gave about
Please if you know the best approach to generate all the possible combinations of numbers typed into the textboxes (Example see panel3.jpg image) help me out,
let me explain More on this
The user will type in the desired unique numbers into the textboxes without repetition (Please see the image i did not repeat any number, so can the code detect when a number have been typed twice?) Else when running the program i will be carefull not typing two numbers twice, but its adviceable to detect when a number is typed more than once.
Then the amount of unique number the user will type or supply to the desired textboxes does not matter here and as you can see in the image the amount of numbers in each column is not the same ie it may or may not be same amount (but number must be unique. Please try and see if it can be done to prompt user to enter the amount of numbers to supply in each column)
Then After supplying the numbers just like the one in Image, The button Click will generate all the Possible Combinations of the all the numbers typed into the textboxes in the columns.. Then After generating the combinations in the Listbox, the next Button will be able to delete them from the Universal 90c5 just like the former.
1000 thanks in advance. Great Programmer Please Arrest my case