revanthb3000
New member
- Joined
- Jan 7, 2012
- Messages
- 4
- Programming Experience
- Beginner
Hi everyone, I'm new to this forum and VB
Recently I started making an application that would perform matrix multiplication. For that I need to take in the matrix data(row,column, elements). I've asked the user about number of rows and columns in a form. I then send him to another form which will contain row*column number of textboxes used to enter the elements.
After reading a bit about the TextBox Class I used the following code to create the variable number of textboxes.
This code works well without problems.
My question is : How do I get the data that the user enters into these boxes ? Using the usual textbox.text gives me a build error.
Thanks in Advance,
RB
Recently I started making an application that would perform matrix multiplication. For that I need to take in the matrix data(row,column, elements). I've asked the user about number of rows and columns in a form. I then send him to another form which will contain row*column number of textboxes used to enter the elements.
After reading a bit about the TextBox Class I used the following code to create the variable number of textboxes.
VB.NET:
For rcounter = 1 To row
For ccounter = 1 To column
Dim strName = "TextBox" & rcounter & ccounter
Dim txt As New TextBox()
Dim sz As New Size(20, 25)
Dim pt = New Point(xpos, ypos)
txt.Name = strName
txt.Size = sz
txt.Location = pt
txt.Visible = True
txt.TextAlign = HorizontalAlignment.Left
Me.Controls.Add(txt)
xpos = xpos + 25
Next
ypos = ypos + 30
xpos = (200 - ((row * 25) / 2))
Next
This code works well without problems.
My question is : How do I get the data that the user enters into these boxes ? Using the usual textbox.text gives me a build error.
Thanks in Advance,
RB