By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,417 Members | 1,192 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,417 IT Pros & Developers. It's quick & easy.

Removing cursor in a text box

P: n/a
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
Nov 20 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Nak
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.
Nov 20 '05 #2

P: n/a
Why not use labels instead? You can change their properites to make them
look like textboxes...

Greg

"Brad Markisohn" <db*********@indesign-llc.com> wrote in message
news:uz**************@TK2MSFTNGP11.phx.gbl...
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

Nov 20 '05 #3

P: n/a
Try

myTextBox.ReadOnly = True

Atara

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #4

P: n/a
Atara wrote:
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).

--

(O)enone
Nov 20 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.