Textbox lock property (Resolved)
How do I achieve this
For Each CntTxt In pnlMain.Controls
If TypeOf CntTxt Is TextBox Then
CntTxt.ReadOnly = True
CntTxt.Cursor = Cursors.Arrow
CntTxt.ForeColor = ForeColor.Blue
End If
Next
Bolded line doesn't work.
Made it to work (Somehow)
Dim txtColl As New Collection
txtColl.Add(txtField1)
txtColl.Add(txtField2)
For i = 1 To txtColl.Count
txtColl.Item(i).Readonly = True
txtColl.Item(i).Cursor = Cursors.Arrow
txtColl.Item(i).ForeColor = ForeColor.Blue
Next