What is the equivalent of TextBox.Locked property of VB6 in Win Forms?

  • Thread starter Thread starter M.M Ansari
  • Start date Start date
M

M.M Ansari

hi all

I want to lock text box so user can not edit the contents but user may copy
the contents... This is done in vb6 by setting Locked property . But it is
not avaiable in winforms... any workaround?

Thanks in advance

Ansari
 
myTextBox.ReadOnly = True
And if you don't want it gray add this afterwards
myTextBox.BackColor = SystemColors.Window

/claes
 
Thanks... dear

Claes Bergefall said:
myTextBox.ReadOnly = True
And if you don't want it gray add this afterwards
myTextBox.BackColor = SystemColors.Window

/claes
 
Back
Top