フォームにゼブラ線を「描きたい」
表ではなく、線だけです
黒
白
黒
白
icanは背景画像をインポートしますが、私はコードを好みます:)
TextBox1.Text = 80
If IsNumeric(TextBox1.Text) Then
Dim color As Integer = 1
Dim top As Integer = 10
Dim LineNum As Integer = Integer.Parse(TextBox1.Text)
For i = 0 To LineNum
Dim line As New Panel
line.Width = 300
line.Height = 40
If color = 1 Then
color = 0
line.BackColor = Drawing.Color.Black
Else
color = 1
line.BackColor = Drawing.Color.White
End If
top = top + 40
line.Top = top
Me.Controls.Add(line)
Next
End If
;)
データグリッドビュー VB.NET のゼブラ
DataGridView1.GridColor = Color.Blue
DataGridView1.DefaultCellStyle.ForeColor = Color.Black
DataGridView1.RowsDefaultCellStyle.BackColor = Color.Red
DataGridView1.AlternatingRowsDefaultCellStyle.BackColor = Color.Yellow
DataGridView1.GridColor = Color.Silver