Learn to build web apps and services, IoT apps, and mobile backends by covering the fundamentals of ASP.NET Core and exploring the core foundations for app libraries.
Private Sub datagridview1_CellPainting(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellPaintingEventArgs) Handles datagridview1.CellPainting
Dim row As DataGridViewRow = datagridview1.Rows(e.RowIndex)
Dim BackColorBrush As New SolidBrush(e.CellStyle.BackColor)
Dim GridBrush As New SolidBrush(Me.datagridview1.GridColor)
Dim GridLinePen As New Pen(GridBrush)
' -- Erase the cell
e.Graphics.FillRectangle(BackColorBrush, e.CellBounds)
Dim ProgressBarBrush As New SolidBrush(Color.Black)
Dim CellProgressBarRect As New Rectangle(e.CellBounds.X, e.CellBounds.Y, e.CellBounds.Width, 2)
e.Graphics.FillRectangle(ProgressBarBrush, CellProgressBarRect)
e.Handled = True
Dim style As New DataGridViewCellStyle
style.Font = New Font(datagridview1.Font, FontStyle.Bold)
datagridview1.Rows(e.RowIndex).DefaultCellStyle = style
End Sub
Do more with
Public Sub SuspendLayout
'Usage
Dim instance As Control
instance.SuspendLayout
' your code
instance.ResumeLayout
Premium Content
You need an Expert Office subscription to comment.Start Free Trial