以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 控件风格 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=109965) |
-- 作者:jianjingmaoyi -- 发布时间:2017/11/23 16:30:00 -- 控件风格 我想遍历设置,这样不可以设置吗? Public Sub ControlStyle(ByVal FrmName As String) Dim c As WinForm.Control For Each c In Forms(FrmName).Controls Select Case c.GetType.Name Case "Button" c.VisualStyle = VisualStyleEnum.Office2007Blue Case "TextBox", "DateTimePicker", "CheckBox", "CheckedComboBox", "CheckedListBox", "ComboBox", "GroupBox", "ListBox", "NumericComboBox" c.VisualStyle = VisualStyleEnum.Office2007Blue() c. c.BackColor = [Color] End Select Next End Sub |
-- 作者:jianjingmaoyi -- 发布时间:2017/11/23 16:48:00 -- 为嘛 按钮不能用代码设置样式 |
-- 作者:有点甜 -- 发布时间:2017/11/23 17:17:00 -- 我这样测试没问题
Dim btn As WinForm.Button = e.Form.Controls("Button1") |