小男孩‘自慰网亚洲一区二区,亚洲一级在线播放毛片,亚洲中文字幕av每天更新,黄aⅴ永久免费无码,91成人午夜在线精品,色网站免费在线观看,亚洲欧洲wwwww在线观看

分享

DGV設(shè)置、綁定圖標(biāo)列表

 *藍(lán)星* 2019-07-20

   '加載主界面表單

    Private Sub FormMain_Load(sender As Object, e As EventArgs) Handles MyBase.Load

        With Me.DGV_GpHqFind

            .EnableHeadersVisualStyles = False                     '行標(biāo)題和列標(biāo)題是否使用用戶當(dāng)前主題式樣

            .ColumnHeadersDefaultCellStyle.Font = New Font("微軟雅黑", 10, FontStyle.Regular)    '標(biāo)題字體

            .RowsDefaultCellStyle.Font = New Font("微軟雅黑", 10, FontStyle.Regular)             '表格字體

            .ColumnHeadersDefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter '標(biāo)題居中

            .RowsDefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight           '表格文字靠右對齊

            .AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells    '設(shè)定包括Header和所有單元格的列寬自動調(diào)整

            .AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.AllCells          '設(shè)定包括Header和所有單元格的行高自動調(diào)整

            .ColumnHeadersDefaultCellStyle.ForeColor = Color.MidnightBlue      '設(shè)定標(biāo)題欄字體顏色

            .ColumnHeadersDefaultCellStyle.BackColor = Color.AliceBlue      '設(shè)定標(biāo)題欄背景顏色

            '.Columns(5).DefaultCellStyle.ForeColor = Color.Red             '設(shè)定第5列的字體顏色

            '.Columns(4).DefaultCellStyle.BackColor = Color.Blue            '設(shè)定第5列的字體顏色

            '.Rows(2).DefaultCellStyle.ForeColor = Color.Red                '設(shè)定第2行的字體顏色

            '.Rows(2).DefaultCellStyle.BackColor = Color.Blue               '設(shè)定第2行的背景顏色

            '.Item(6, 2).Style.BackColor = Color.FromArgb(255, 180, 255)    '設(shè)定指定單元格背景顏色

            '.Item(3, 0).Style.ForeColor = Color.FromArgb(0, 240, 80)       '設(shè)定指定單元格字體顏色

            '.Columns(4).SortMode = DataGridViewColumnSortMode.Programmatic '排序模式

            .AllowUserToAddRows = False     '不顯示最下面的新行

        End With

        Menu_Main.Location = New Point(0, 0)        '主菜單位置

        Tools_Main.Location = New Point(3, 27)      '主工具欄位置

        Tools_Sub.Location = New Point(Tools_Main.Width + 5, 27)       '次工具欄位置

        '綁定圖標(biāo)列表

        For i = 0 To Tools_Main.Items.Count - 1

            If Not Tools_Main.Items(i).GetType.Name = "ToolStripLabel" Then 'ToolStripButton

                Tools_Main.Items(i).Image = ImageListTools_Main.Images.Item(i)

            End If

        Next

        For i = 0 To Tools_Sub.Items.Count - 1

            If Not Tools_Sub.Items(i).GetType.Name = "ToolStripLabel" Then

                Tools_Sub.Items(i).Image = ImageListTools_Sub.Images.Item(i + 5)

            End If

        Next

    End Sub

    本站是提供個人知識管理的網(wǎng)絡(luò)存儲空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點(diǎn)。請注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購買等信息,謹(jǐn)防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點(diǎn)擊一鍵舉報。
    轉(zhuǎn)藏 分享 獻(xiàn)花(0

    0條評論

    發(fā)表

    請遵守用戶 評論公約

    類似文章 更多