在制作多语言程序的时候如果使用”System.ComponentModel.ComponentResourceManager res = new ComponentResourceManager(typeof(A12DForm));“来调用窗体资源。
这时候想要修改其他语言(非Default)的窗体内容(直接通过修改窗体属性为其他语种,在设计器中直接修改控件信息,如控件的Text属性),这时候可能会遇到窗体设计器内的部分属性无法修改(修改之后调试程序又恢复成修改前的样子),程序调试运行时虽然不会报错,但是界面混乱,部分修改如Text、图标等无效,退出调试后发现之前修改的内容又恢复到修改之前的样子。且我暂时找不到方法解决这个问题。
要避免产生这个问题去修改制作多语言程序的话,可以在其他语言的资源文件如:A12DForm.en.res中修改字符串内容
不要直接在窗体设计器里修改
关于使用System.ComponentModel.ComponentResourceManager类方法遇到的问题
最新推荐文章于 2024-07-18 09:26:11 发布