0

フォームにゼブラ線を「描きたい」

シマウマ

表ではなく、線だけです





icanは背景画像をインポートしますが、私はコードを好みます:)

4

2 に答える 2

0
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

;)

于 2012-06-20T13:00:44.713 に答える
0

データグリッドビュー 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
于 2014-07-12T09:52:59.493 に答える