hey ya all
i have a simple question how to change the language on enter and exit events of text boxes and if you could include a link to a language code table or something that would also be nice
thanks

ok, i guess again i solved it myself tho it was not so hard but in case some one needs it i'm putting it here:

// these are enter and exit events of a textbox, and the "fre" and "eng" are the initial letters of 2 languages ( go figure what languages lol)
 private void nametbx_Enter(object sender, EventArgs e)
        {
            SetKeyboardLayout(GetInputLanguageByName("fre"));            
        }

        private void nametbx_Leave(object sender, EventArgs e)
        {
            SetKeyboardLayout(GetInputLanguageByName("eng"));
        }
// and here are the functions used in those events:
        public static InputLanguage GetInputLanguageByName(string inputName)
        {
            foreach (InputLanguage lang in InputLanguage.InstalledInputLanguages)
            {
                if (lang.Culture.EnglishName.ToLower().StartsWith(inputName))
                    return lang;
            }
            return null;
        } 
// and the other one:
    public void SetKeyboardLayout(InputLanguage layout)
        {
            InputLanguage.CurrentInputLanguage = layout;
        }
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.