I am converting a vb6 program to vb.net
in vb6 i am using the following code to generate 25 Textboxes down the page , under eachother, dynamically using F1(0) as the starting position
ir F1(1), F1(2) etc up to 25
??? is there a way of doing this in vb.net
Really appreciate some help
----------------------------------------------------------------
Fld = "F1" 'ie it's a textbox
NumRows = 25
NumCols = 1
With Controls(Fld)(0)
GridTop = .Top
GridLeft = .Left
CellHeight = .Height
CellWidth = .Width
.Visible = False
.Enabled = False
End With
For Idx = 1 To (NumCols * NumRows)
Load Controls(Fld)(Idx)
With Controls(Fld)(Idx)
.Move GridLeft + ((Idx Mod NumCols) * CellWidth), GridTop + ((Idx \ _
NumCols) * CellHeight)
.Visible = True
.Enabled = True
End With
Next Idx 'Idx
Next ll
in vb6 i am using the following code to generate 25 Textboxes down the page , under eachother, dynamically using F1(0) as the starting position
ir F1(1), F1(2) etc up to 25
??? is there a way of doing this in vb.net
Really appreciate some help
----------------------------------------------------------------
Fld = "F1" 'ie it's a textbox
NumRows = 25
NumCols = 1
With Controls(Fld)(0)
GridTop = .Top
GridLeft = .Left
CellHeight = .Height
CellWidth = .Width
.Visible = False
.Enabled = False
End With
For Idx = 1 To (NumCols * NumRows)
Load Controls(Fld)(Idx)
With Controls(Fld)(Idx)
.Move GridLeft + ((Idx Mod NumCols) * CellWidth), GridTop + ((Idx \ _
NumCols) * CellHeight)
.Visible = True
.Enabled = True
End With
Next Idx 'Idx
Next ll