以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 报错 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=169388) |
-- 作者:wgqcool -- 发布时间:2021/6/15 0:27:00 -- 报错 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不支持这几条属性,要怎么写?
|
-- 作者:有点蓝 -- 发布时间:2021/6/15 8:36:00 -- .net 的按钮不支持这些属性,所以不能用,有什么属性可以使用,看官方帮助:https://docs.microsoft.com/zh-cn/dotnet/api/system.windows.forms.button?view=netframework-4.0 |