-
unlock form fields
Hi,
I have a form that when i click edit i want to be able to unlock all the text boxes and combo boxes on my form. In VB6 i used to do:
Code:
Dim xControl as control
on error resume next
For each xControl in frmForm
xControl.locked = false
next
on error goto 0
any ideas how to do it in vb.net?
many thanks
Nick
-
It's a little weird, but in the Properties of the Textbox, you'll see a Locked property. However in .NET code Locked is changed to ReadOnly.
Therefor you would use:
TextBox1.ReadOnly = False