Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim table As New DataTable table.Columns.Add("科目", GetType(String)) table.Columns.Add("点数", GetType(Integer)) table.Rows.Add("国語", 80) table.Rows.Add("数学", 30) table.Rows.Add("英語", 50) DataGridView1.DataSource = table End Sub Private Sub DataGridView1_CellPainting(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellPaintingEventArgs) Handles DataGridView1.CellPainting If e.ColumnIndex = 0 AndAlso e.RowIndex >= 0 Then '点数取得 Dim pointColumnValue As Object = DataGridView1.Rows(e.RowIndex).Cells("点数").Value Dim point As Integer If IsDBNull(pointColumnValue) Then Return Else point = DataGridView1.Rows(e.RowIndex).Cells(1).Value End If '▼描画 '背景描画 e.PaintBackground(e.CellBounds, e.State = DataGridViewElementStates.Selected) '点数分の赤い棒を描画 Dim BarRect As Rectangle = e.CellBounds BarRect.Width = BarRect.Width * (point / 100) e.Graphics.FillRectangle(Brushes.Red, BarRect) '科目名描画 e.Graphics.DrawString(e.Value, DataGridView1.Font, Brushes.Black, e.CellBounds) '▲ e.Handled = True End If End Sub