在运行时切换 WinForm 程序的界面语言
2006-08-22 15:48
357 查看
http://getacoder.cn.cnblogs.com/archive/2006/04/09/370563.html
private void myButton_Click(object sender, EventArgs e)
{
int currentLcid = Thread.CurrentThread.CurrentUICulture.LCID;
currentLcid = (currentLcid == 2052) ? 1033 : 2052;
// Changes the CurrentUICulture property before changing the resources that are loaded for the win-form.
Thread.CurrentThread.CurrentUICulture = new CultureInfo(currentLcid);
// Reapplies resources.
ComponentResourceManager resources = new ComponentResourceManager(typeof(MyForm));
resources.ApplyResources(myButton, "myButton");
resources.ApplyResources(this, "$this");
}
private void myButton_Click(object sender, EventArgs e)
{
int currentLcid = Thread.CurrentThread.CurrentUICulture.LCID;
currentLcid = (currentLcid == 2052) ? 1033 : 2052;
// Changes the CurrentUICulture property before changing the resources that are loaded for the win-form.
Thread.CurrentThread.CurrentUICulture = new CultureInfo(currentLcid);
// Reapplies resources.
ComponentResourceManager resources = new ComponentResourceManager(typeof(MyForm));
resources.ApplyResources(myButton, "myButton");
resources.ApplyResources(this, "$this");
}
相关文章推荐
- 在运行时切换 WinForm 程序的界面语言
- 在运行时切换 WinForm 程序的界面语言 System.ComponentModel.ComponentResourceManager .ApplyResources
- 在运行时切换 WinForm 程序的界面语言 ---------多语言设置基础
- WinForm程序的界面多语言切换
- 如何在运行时切换WinForm程序使用的语言?
- WinForm程序的界面多语言切换
- 程序运行时切换语言
- C#程序双击运行之后,界面不显示,但是在任务管理器有进程(一个winform找bug之旅)
- C++ Builder运行时在FireMonkey里使用TLang动态切换界面语言
- 【C#】检测“程序已运行”,并切换到已运行程序界面
- 网络采集软件核心技术剖析系列(7)---如何使用C#语言搭建程序框架(经典Winform界面,顶部菜单栏,工具栏,左边树形列表,右边多Tab界面)
- 检测某个程序是否已经运行,如果运行就切换到该程序界面
- C# Winform软件多语言(汉语、英语。。。)界面的切换,低耦合
- WinForm 界面的多语言切换
- DevExpress15.1 设计winform程序运行后界面不弹出未注册界面的解决办法
- symbian程序运行时切换本地化动态多语言
- 如何使MFC编写的程序作为服务运行,并正常显示界面
- 合理的布局,绚丽的样式,谈谈Winform程序的界面设计
- eclipse界面语言切换
- 在双击控件进入到程序代码编辑界面后,没写东西不影响运行,但删除后报错