code:var EM_GETSEL = 0xB0; var EM_SETSEL = 0xB1; var Start = Interop.Allocate(32); Interop.Call("user32", "SendMessageW", Wnd.GetControlHandle("NameEdit"), EM_GETSEL, Start, 0);