Hi,
Well you could use KeyDown and set the Handled property to true, this
effectively means that you eat the keystroke, now even as this may solve
your problem it could confuse the user of the application, as he see that
the control is not greyout but he does not see his keystrokes in the control
it could think that your application has an error.
I think that the greyout is more commonly recognized as a control that
cannot be changed.
Cheers,
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"ChrisM" <hi****@AskMeIfYouWantIt.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
I have a Windows form in a C# project.
What I want to do under certain circumstances is to 'Lock' a text-box.
I know that I can do this by setting the Enable property to false, but
this greys it out.
Any suggestions as to the best way of making a TextBox read-only without
greying it out?
Regards,
ChrisM