If Tables("颜色")(0)("一级") Like "* ;" Then e.Form.Controls("ColorPicker1").Color = Color.FromARGB(Tables("颜色")(0)("一级")) Else Dim s As String = Tables("颜色")(0)("一级") e.Form.Controls("ColorPicker1").Color = Color. & s End If
哪里错了,要怎么修改
此主题相关图片如下:002.png
[此贴子已经被作者于2022/8/25 13:01:32编辑过]
-- 作者:有点蓝
-- 发布时间:2022/8/25 13:46:00
--
如果颜色是名称,使用下面方法:
Dim c As color = Color.FromName("SkyBlue")
Output.Show(c.Tostring)
如果是rgb值需要转换为整数
Dim s As String = "0;218;154"
Dim ss() As String = s.split(";")
Dim c As color = Color.FromARGB(255, CInt(ss(0)), CInt(ss(1)), CInt(ss(2)))