|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
SendKeys problem when using Non-English Windows keyboard layoutsHi,
I'm experiencing a problem when using the VB SendKeys method. I'm sending characters to a textbox in another application. It works fine when the Windows Input Languages on both apps are set to English, but if they are set to say German, I'm getting the wrong characters in my client textbox. This is my SendKeys statement: SendKeys.Send(MyString) Thanks in advance, davidm The docs for SendKeys.Send says that you should avoid it in applications
intended for international use since it can lead to unpredictable results. Guess you just proved that :-(. That being said, I have successfully used it with a bunch of different keyboard layouts. However I only sent international characters, so I guess it depends on what characters you're actually trying to send. Do you have to send the actual keystrokes? If all you want to do is set the text in the textbox there are other ways (see WM_SETTEXT) /claes <daver***@hotmail.com> wrote in message Show quoteHide quote news:1154035884.769852.295260@m79g2000cwm.googlegroups.com... > Hi, > > I'm experiencing a problem when using the VB SendKeys method. I'm > sending characters to a textbox in another application. It works fine > when the Windows Input Languages on both apps are set to English, but > if they are set to say German, I'm getting the wrong characters in my > client textbox. > > This is my SendKeys statement: > SendKeys.Send(MyString) > > > Thanks in advance, > > davidm > That should say "...I only sent standard English characters (i.e. 7-bit
ASCII)..." /claes Show quoteHide quote "Claes Bergefall" <louplou@nospam.nospam> wrote in message news:%23bahVRlsGHA.4596@TK2MSFTNGP04.phx.gbl... > The docs for SendKeys.Send says that you should avoid it in applications > intended for international use since it can lead to unpredictable results. > Guess you just proved that :-(. > > That being said, I have successfully used it with a bunch of different > keyboard layouts. However I only sent international characters, so I guess > it depends on what characters you're actually trying to send. Do you have > to send the actual keystrokes? If all you want to do is set the text in > the textbox there are other ways (see WM_SETTEXT) > > /claes > > > <daver***@hotmail.com> wrote in message > news:1154035884.769852.295260@m79g2000cwm.googlegroups.com... >> Hi, >> >> I'm experiencing a problem when using the VB SendKeys method. I'm >> sending characters to a textbox in another application. It works fine >> when the Windows Input Languages on both apps are set to English, but >> if they are set to say German, I'm getting the wrong characters in my >> client textbox. >> >> This is my SendKeys statement: >> SendKeys.Send(MyString) >> >> >> Thanks in advance, >> >> davidm >> > > Thanks for your response!
yes I do want to send the actual keystrokes in order to simulate a physical keyboard. Usually only 2-3 ASCII characters display incorrectly when using non-English layouts. I just thought there may be a workaround for this problem. But I might have to resort to the 'keybd_event' API call which I would like to avoid because SendKeys works great in all other aspects of our application such as sending text to a textbox within the same application. davidm "daver***@hotmail.com" wrote: You need to change the keyboard layout of the sending application to match > Hi, > > I'm experiencing a problem when using the VB SendKeys method. I'm > sending characters to a textbox in another application. It works fine > when the Windows Input Languages on both apps are set to English, but > if they are set to say German, I'm getting the wrong characters in my > client textbox. the keyboard layout of the focused application. We offer a .NET component FREE for non-commercial use that will work great with non-English keyboards (except for complex keyboards which require IME): http://www.mini-tools.com/goto/input
how to send null value to an Integer type variable?
Simple SELECT CASE Question Copy of class instance VStudio 2003 and 2005 on the same workstation? loop thru list of functions? Ping subnet Creating custom command line switches? Type validation VB.NET Winsock Multithreading question. how do i access string() array inside arraylist? |
|||||||||||||||||||||||