本文介绍了“表单"问题数据类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的朋友,

我在类库项目中有以下代码:

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

推荐答案


这篇关于“表单"问题数据类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-02 00:21