简体   繁体   中英

C# WinForm application crashing (Culture ID XXXX (0xYYYY) is not a supported culture) when switching keyboard language?

I use Visual Studio 2005 to create an empty C# WinForm application where only Form1 is showing. Whenever I run it, either from within Visual Studio or by double-clicking the.exe-file, and then switch language on my keyboard I get the following exception and my application crashes:

Culture ID 9216 (0x2400) is not a supported culture. Parameter name: culture

If I debug it from Visual Studio, then the exception happens in Program.cs on the following line:

Application.Run(new Form1());

How can I solve this in my application ? I don't want to switch to a newer .NET Framework and I don't want to have to make changes on all the computers this application is running on.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM