Hi Berni,
I am not familiar with the german keyboard, so it is hard for me say the
root cause without reproducing the problem. Is it possible that only "^" is
translated into "&" on german keyboard?
Actually, using SendKeys.Send is not operating the on-screen keyboard, it
is sending keystrokes through the real keyboard input queue, so it will be
affected by the real keyboard settings instead of the on-screen keyboard.
That's why MSDN placed a "Caution" for SendKeys.Send() method.
Can you help to explain what you want to achieve? Maybe we have other
solution to workaround this problem. If you just want to send characters to
a TextBox in an application(or your own application), the simplest solution
is calling SendMessage(WM_CHAR) to that control/window. In the "wParam" of
SendMessage API, we may specify the character ASCII code. For example, we
may specify 94(0x5E) for "wParam" for "^" character. The link below
contains the ASCII character table:
"ASCII Character Codes Chart 1"
http://msdn.microsoft.com/en-us/library/60ecse8t.aspx
Actually, even we are using SendKeys.Send, the target application will just
receive a WM_LBUTTONDOWN message for the real keyboard button, which will
finally be translated into WM_CHAR by Winform/Win32 code. So, using WM_CHAR
is a more straightforward solution.
If you want to take this approach and need further help, please feel free
to tell me, thanks.
Best regards,
Jeffrey Tan
Microsoft Online Community Support
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.