I have a help non-modal dialog that just displays a text message in a textbox. The textbox is the only component in the form.
The problem is that when the dialog is displayed, all the text in the textbox is selected / highlighted. I have tried calling deselectAll on the textbox in the constructor and in the load and visible changed methods with no change.
How do I get rid of the selection

textbox test always highlighted on window open
sdflksdfsda sdfklsdf sdk ksdfk s
Correct. I don't mind selectable / highlightable, I just don't want the carat to show up. Having a blinking carat in the textbox makes it seem like it is editable (which it is not because I have set readonly to true).
What I want is a read-only multi-line text display area. It should not require a horizontal scrollbar (ie. word-wrap). It should not display the carat (I would have though read-only would have taken care of this but it does not).
xxpor
cleith
I am not doing it myself. How do I prevent focus from going to the textbox if it is the only component in the form
Obsolete
Dattan
china_chinese
MachAngle
Steven Yetter
John Doh
The only problem with the above is that I would prefer to have word-wrap available so that a horizontal scrollbar is not required.
arb70sok
tbx_Search.Select(_tbx_Search.Text.Length,0);
Visual C# Novice
DagAnderson
That prevents the user from being able to put focus on the component by hitting tab, however it does not prevent the user from being able to put the focus on the component by clicking it.
I don't want the I-beam carot ever displayed in the textbox.
Any thoughts
kevin888
jaortizgonzalez