![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | Send input to TextBox programatically I everybody, I'm trying, when a control receives an OnPreviewKeyDown event, to send this KeyStroke to another control (control in question varies from a case to another)... By just sending a PreviewKeyDown/KeyDown RoutedEvent to the control, it works fine (for some controls), however, in the case of a TextBox, it fails miserably... I tried passing by the InputManager... (InputManager.Current.ProcessInput()... ) Has anybody succeeded in doing something like this? Or otherwise, is there any other Text input control which would suit my needs? Thanks. |
| | #2 (permalink) |
| Guest | Re: Send input to TextBox programatically There's no way to simulate input in Avalon other than calling Win32's SendInput method. Raising a KeyDown event is an approximation networks in some cases, but as you've noticed, it doesn't work with TextBox because it doesn't generate TextInput events or update the state of the Keyboard class correctly. Perhaps there's another way of accomplishing what you're trying to do -- why do you want to forward keyboard input to another control? -Nick Kramer [MSFT] http://blogs.msdn.com/nickkramer This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at http://www.microsoft.com/info/cpyright.htm "Marcus" <larochem@gmail.com> wrote in message news:1149539035.440188.263640@h76g2000cwa.googlegroups.com... >I everybody, > > I'm trying, when a control receives an OnPreviewKeyDown event, to > send this KeyStroke to another control (control in question varies from > a case to another)... By just sending a PreviewKeyDown/KeyDown > RoutedEvent to the control, it works fine (for some controls), however, > in the case of a TextBox, it fails miserably... > > I tried passing by the InputManager... > (InputManager.Current.ProcessInput()... ) > > Has anybody succeeded in doing something like this? > > Or otherwise, is there any other Text input control which would suit > my needs? > > Thanks. > |
| |
| |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Chinese Traditional Input using Phonetic Input | Jess | Vista General | 0 | 01-11-2008 11:56 AM |
| Programatically changing JPG Metatags | Dzomlija | Vista music pictures video | 0 | 01-11-2008 04:38 AM |
| Programatically disable OWA access ?? | voodooking | PowerShell | 6 | 12-07-2007 05:22 PM |
| Missing manual recipient input fields in send dialog? | Blue Max | Vista print fax & scan | 0 | 05-17-2007 07:12 PM |
| Programatically detecting ReadyBoost | Hector | Vista General | 1 | 02-28-2007 01:44 PM |