Rss & SiteMap

Foxtable(狐表) http://www.foxtable.com

新一代数据库软件,完美融合Access、Foxpro、Excel、vb.net之优势,人人都能掌握的快速软件开发工具!
共2 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:动态控件颜色赋值

1楼
yifan3429 发表于:2024/2/27 19:49:00
For Each c As Winform.Control In e.Form.Controls
    Dim Value1 As String = "Color.LightSkyBlue|Color.DarkTurquoise|Color.DarkCyan|Color.MediumTurquoise|Color.MediumAquamarine|Color.Olive|Color.DarkKhaki|Color.Orange|Color.FireBrick"
    Dim sps1() As Char = {"|"}
    Dim Names1() As String = Value1.Split(sps1)
    For Each Name1 As String In Names1
        c.BackColor = Name1 
        '        Output.Show(Name1)
    Next
Next

---------------------------
错误
---------------------------
编译错误:类型“String”的值无法转换为“System.Drawing.Color”。



错误代码:c.BackColor = Name1
---------------------------
确定   
---------------------------

2楼
有点蓝 发表于:2024/2/27 20:41:00
http://foxtable.com/bbs/dispbbs.asp?boardid=2&Id=151712
共2 条记录, 每页显示 10 条, 页签: [1]

Copyright © 2000 - 2018 foxtable.com Tel: 4000-810-820 粤ICP备11091905号

Powered By Dvbbs Version 8.3.0
Processed in .03125 s, 2 queries.