在“控制面板|区域和语言选项|区域选项”下,把中文(中国)改成相应的语言。
但高级里不要改,否则会混乱,比如改成英文,如果程序放在桌面就不好用了,应为路径会带“桌面”两字,引起Unicode错误
另外
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using System.Globalization; //添加这个
namespace LGS
{
static class Program
{
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main()
{
//不加下面这句,有可能多语言不好使
System.Threading.Thread.CurrentThread.CurrentUICulture = CultureInfo.CurrentCulture;
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new frmLogin());
}
}
}