|
-
Jun 3rd, 2001, 02:14 PM
#1
Thread Starter
New Member
removing blinking cursor from text field
How can I remove the blinking cursor from a text field that my program is automatically updating? In other words, users won't be entering anything into the text field so how can I edit the text field so that there won't be a cursor inside of it?
Thanks,
Intaglio
-
Jun 3rd, 2001, 02:30 PM
#2
Junior Member
Re: Cursor
I dont know how to take it away bar setting the focus to another control but why not just have the cursor at the end of the string in the field as soon as it updates, it look alright.
Code:
Text1.SelStart = Len(Text1.Text)
Just an idea!
"Three minutes thought would suffice to find this out; but thought is irksome and three minutes is a long time."
"The supreme irony of life is that hardly anyone gets out of it alive."
-
Jun 3rd, 2001, 03:10 PM
#3
Addicted Member
-
Jun 3rd, 2001, 04:04 PM
#4
Thread Starter
New Member
yeah locked=true was one of the first things I tried and the cursor still shows up in the field. If I do enabled=false it takes the cursor away but makes the font too light.
-
Jun 3rd, 2001, 04:42 PM
#5
Addicted Member
Well you can always cheat, set enabled = false then set the forecolor = to whatever it was before that.
-
Jun 3rd, 2001, 04:44 PM
#6
_______
<?>
Private Declare Function HideCaret _
Lib "user32" ( _
ByVal hwnd As Long) As Long
Private Declare Function ShowCaret _
Lib "user32" ( _
ByVal hwnd As Long) As Long
Private Sub Text1_GotFocus()
HideCaret Text1.hwnd
End Sub
Private Sub Text1_LostFocus()
ShowCaret Text1.hwnd
End Sub
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|