Search code examples
c#winformstextboxhighlighting

Blocking the ability of being able to highlight text in a textbox in a C# windows form


I want to create a Windows form in C# with textbox whose text cannot be altered or selected by the user. I managed to make it unalterable (ReadOnly = true), but I am still able to select and highlight the text.

How can I change this?

Thanks!

-R


Solution

  • Use label inplace of textbox. I think you only want to show information but not to select, not to copy, using label will be better option...