Windows XP

Moderators: None (Apply to moderate this forum)
Number of threads: 168
Number of posts: 271

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Detecting language bar changes Posted by Arie_L on 11 Jul 2005 at 8:14 PM
I need to write a program which knows which language is selected in the language bar.

Anybody knows how to do that?
Report
Re: Detecting language bar changes Posted by m_karwal on 21 Aug 2009 at 6:34 AM
You cna do this is C# as follows:

a) Start a C# Console Applictaion.
b) Open solution exlorer and add refernce to System.Windows.Forms.
c) Paste the followng code in the Project Editor.

using System;
using System.Globalization;
using System.Windows.Forms;

namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
InputLanguage myDefaultLanguage =
InputLanguage.DefaultInputLanguage;
Console.WriteLine("Current input language is now: " +
myDefaultLanguage.Culture.EnglishName);
Console.ReadLine();
}
}
}

d) Compile the code and run it.

You should be able to see the current input languag selected in the language bar.





 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.