changin Keyboard layout dynamically

A

Aftab Alam

Hello All
I want to change the keyboard layout dynaically, ie if a use focuses on my
application the keyboard layout gets set to Arabic and if on any other
application it should be english ??
How can I achieve this
Regards
Muhammad Aftab Alam
 
C

Cameron McColl

Hi Muhammad,

It took me a while to figure that one out but it turns out it's really
easy. Here's an example that sets the keyboard for an app to the English
keyboard instead of the US keyboard:

'&h809 is the English - United Kingdom culture.
Dim x As New System.Globalization.CultureInfo(&H809)
InputLanguage.CurrentInputLanguage = InputLanguage.FromCulture(x)


You can see a full list of the culture info id's in help:
ms-help://MS.VSCC.2003/MS.MSDNQTR.2003APR.1033/cpref/html/frlrfsystemglobali
zationcultureinfoclasstopic.htm
If that link doesn't work simply look up the CultureInfo Class.


Cameron McColl
Microsoft
--------------------
| From: "Aftab Alam" <[email protected]>
| Subject: changin Keyboard layout dynamically
| Date: Thu, 4 Sep 2003 12:46:40 +0500
| Lines: 10
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 5.50.4807.1700
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Message-ID: <[email protected]>
| Newsgroups: microsoft.public.dotnet.languages.vb
| NNTP-Posting-Host: 203.81.201.108
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP11.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vb:134088
| X-Tomcat-NG: microsoft.public.dotnet.languages.vb
|
| Hello All
| I want to change the keyboard layout dynaically, ie if a use focuses on my
| application the keyboard layout gets set to Arabic and if on any other
| application it should be english ??
| How can I achieve this
| Regards
| Muhammad Aftab Alam
|
|
|
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top