Dim drs As List(of DataRow) = DataTables("Sys_Modular").Select("Name = '" & e.Form.name & "'")
Dim i As Integer = 0
For Each dr As DataRow In drs
Dim ct As New System.Windows.Forms.Button
ct.Left = i
ct.Top = 0
ct.Width = 70
ct.Height = 25
ct.Text = dr("PID")
ct.name = dr("ID")
ct.Theme = "(none)"
ct.Image = getimage(dr("Images"))
ct.BorderSize = 0
ct.MouseOverBackColor = Color.LightSkyBlue
ct.MouseDownBackColor = Color.Transparent
ct.ImageAlign = ContentAlignment.TopRight
ct.TextAlign = ContentAlignment.MiddleCenter
ct.TextImageRelation = TextImageRelation.ImageBeforeText
e.Form.Controls("SplitContainer3").panel2.basecontrol.Controls.Add(ct)
i += 80
AddHandler ct.Click, AddressOf Button1_Click
Next
以上代码,黄底红字的代码行一出现就报错“未知编译错误”;注释掉就正常。如果是System.Windows.Forms.Button不支持这几条属性,要怎么写?