【转载】VB.NET 改变MDI窗口的颜色,给DataGridview 行 增加颜色

来源:互联网 发布:淘宝客鹊桥pid 编辑:程序博客网 时间:2024/06/05 09:30

    Dim MDI As MdiClient                               '改变窗口的颜色  在窗口里面设置背景
        For Each ctl As Control In Me.Controls
            Try
                MDI = CType(ctl, MdiClient)
                MDI.BackColor = Me.BackColor
            Catch ex As Exception
            End Try
        Next

 

给DataGridview 行 增加颜色:

 DataGridView1.Rows(e.RowIndex).DefaultCellStyle.BackColor = Color.FromArgb(222, 234, 245)

原创粉丝点击