|
-
Jul 19th, 2008, 09:59 AM
#1
Thread Starter
Member
How do I get the API after setting a text box to goto the last word in the text box?
I'm having a problem with figuring this out so, how would I goto the last word in a textbox after setting the text box text? For example I put the text "lala" into a textbox and it'll put the cursor to the beginning of the text how would I get the cursor to goto the end instead of the beginning?
-
Jul 20th, 2008, 12:54 AM
#2
Re: How do I get the API after setting a text box to goto the last word in the text box?
Hai,
if its your own vb app then,
Code:
Me.Text1.SelStart = Len(Me.Text1.Text)
Me.Text1.SelLength = 1
-
Jul 20th, 2008, 08:04 AM
#3
Thread Starter
Member
Re: How do I get the API after setting a text box to goto the last word in the text box?
I'm coding API for someone elses application and want to know how to get the cursor to the end of there textbox after it places text in it
-
Jul 20th, 2008, 08:12 AM
#4
Re: How do I get the API after setting a text box to goto the last word in the text box?
oh is it,
hm, ill check it. did you check with spy++ for what messages are send when do such a thing. ok ill come back if i got a solution 
May be there should be a simple way
-
Jul 20th, 2008, 08:44 AM
#5
Re: How do I get the API after setting a text box to goto the last word in the text box?
OK,
Code:
SendMessage(hwnd,WM_KEYDOWN,VK_END,0)
Should be working fine
-
Aug 12th, 2008, 01:08 AM
#6
New Member
Re: How do I get the API after setting a text box to goto the last word in the text box?
Don't forget to put in
before the code
-
Aug 12th, 2008, 06:07 AM
#7
Re: How do I get the API after setting a text box to goto the last word in the text box?
Or you could use the EM_SETSEL message.
http://support.microsoft.com/kb/109550
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
|