Locate Caret in Textbox


'Place text in textbox and locate
'caret at end of text.

nomainwin
textbox #1.t, 10,10,100,124
Open "Type" for window as #1
#1 "trapclose [quit]"
#1.t "!setfocus"
#1.t "Hello World"

startpos=len("Hello World")
endpos=startpos

hText=hwnd(#1.t)
calldll #user32, "SendMessageA",_
hText as ulong,_EM_SETSEL as long,_
startpos as long, endpos as long,_
re as long

wait

[quit] close #1:end

Home

Source Code

Utilities

Internet

Games

Graphics

Media Demos

Snippets

DLL's

API Resources

Freeware

LB 4 Companion

Mastering LB 3

LB Workshop

Game Workshop

Links

Index