需要有关错误的帮助 [英] Need help regarding the error
本文介绍了需要有关错误的帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好
以下是我的代码
Hi all
Below is my code
Private Sub ChangeLanguage(ByVal lang As String)
For Each c As Control In Me.Controls
Dim resources As ComponentResourceManager = New ComponentResourceManager(GetType(MainWindow))
resources.ApplyResources(c, c.Name, New CultureInfo(lang))
Next c
End Sub
i想要更改组合框选择的控件语言
但是它给出了错误
i want to change language of controls on a combo box selection
but it's giving error
'Controls' is not a member of 'CulturalInfo.MainWindow'.
请告诉我这个问题。
Please tell me the problem.
推荐答案
看看这个。
语言特定设置 [ ^ ]
谢谢!
Hi,
Look at this.
Language Specific Settings [^]
Thanks!
Windows窗体应用程序的语言特定设置< br $> b $ b
语言文化设置 [ ^ ]
Language Specific Settings for Windows Forms Application
Language Culture Settings[^]
问题在于你尝试在WPF中使用WinForms应用程序中的代码。 WPFWindow
类与WinFormsForm
类不同。正如您的错误消息所示,那里没有Controls
属性。如果你真的需要处理WPF项目,请首先阅读有关WPF的内容
the problem is that you try to use code from WinForms application in WPF one. WPFWindow
class is a different thing from WinFormsForm
class. There is noControls
property there, exactly as your error message says. If you really need to work on WPF project, read something about WPF first
这篇关于需要有关错误的帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文