Removing cursor in a text box

  • Thread starter Thread starter Brad Markisohn
  • Start date Start date
B

Brad Markisohn

I'm using small text boxes to indicate specific states by altering the
BackColor property. I also have a number of other controls on the form, but
when I run the app I see the cursor flashing in the first text box. I don't
want to see anything in the text boxes, but I can't figure out how to get
rid of the flashing cursor. I've played with the focus and cursor
properties to no avail. Any assistance would be appreciated.

TIA

Brad
 
Hi Brad,
I'm using small text boxes to indicate specific states by altering the
BackColor property. I also have a number of other controls on the form, but
when I run the app I see the cursor flashing in the first text box. I don't
want to see anything in the text boxes, but I can't figure out how to get
rid of the flashing cursor. I've played with the focus and cursor
properties to no avail. Any assistance would be appreciated.

Take a look here

http://www.mentalis.org/apilist/HideCaret.shtml

Nick.
 
Why not use labels instead? You can change their properites to make them
look like textboxes...

Greg
 
Atara said:
Try

myTextBox.ReadOnly = True

That doesn't stop the caret from displaying.

The only way I know of doing this is to use the HideCaret API (I can't spot
a native .net way of doing this).
 
Back
Top