“表单"问题数据类型 [英] Problem with "form" datatype
本文介绍了“表单"问题数据类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
亲爱的朋友,
我在类库项目中有以下代码:
dear friends,
i have the following code in a class library project:
Public Sub SetAllTextBoxesLanguage(ByVal CurrentForm As form)
Dim MyFont As System.Drawing.Font
Select Case InputMethod
Case "Unicode"
For Each MyControl As Control In CurrentForm.Controls
If TypeOf MyControl Is TextBox Then
MyFont = MyControl.Font
MyControl.Font = New Font(MyFont.Name, MyFontSize, FontStyle.Regular)
End If
Next
Case "NonUnicode"
For Each MyControl As Control In CurrentForm.Controls
If TypeOf MyControl Is TextBox Then
MyControl.Font = New Font(MyFontName, MyFontSize, FontStyle.Regular)
End If
Next
End Select
End Sub
但是它显示表单"和控件"类型的错误.
你能告诉我这里是什么问题吗?
问候
SKPaul
But it shows error with the type "form" and "Control".
Would you please tell me what is the problem here?
Regards
SKPaul
推荐答案
那又是什么错误?我们要猜吗?
无论如何,仅凭猜测,您是否在应用程序中引用了System.Windows.Forms
?在班级顶部尝试Import System.Windows.Forms
.
And what error? Do we have to guess?
Anyways, just a guess, do you have reference toSystem.Windows.Forms
in your application? TryImport System.Windows.Forms
at the top of your class.
这篇关于“表单"问题数据类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文