25-05-13, 01:47 AM
طيب :
خذ الحدث التالى نسخ ولص فقط :
خذ الحدث التالى نسخ ولص فقط :
PHP كود :
Private Sub DataGridView1_RowPostPaint(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewRowPostPaintEventArgs) Handles DataGridView1.RowPostPaint
Dim strRowNumber As String = (e.RowIndex + 1).ToString
Dim size As SizeF = e.Graphics.MeasureString(strRowNumber, Me.Font)
DataGridView1.RowHeadersWidth = 60
Dim b As Brush = SystemBrushes.ControlText
e.Graphics.DrawString(strRowNumber, Me.Font, b, e.RowBounds.Location.X + 15, e.RowBounds.Location.Y + ((e.RowBounds.Height - size.Height) / 2))
End Sub

