2012-06-20 95 views
0

我想 「畫」 斑馬線線在我的形式
VB.NET斑馬線

zebra

不是表,只是線

白色

白色


ican進口背景圖片,但我更喜歡鱈魚E :)

+0

這是一個WinForm項目?文本如何顯示?在一個控件中,還是僅僅繪製到表單的表面? –

+1

我們不能回答你的問題,因爲你沒有告訴我們你在做什麼。你在說什麼?一個winForms控件的某種類型的報告gridview,ASP.NET或WinForms或WPF或其他?你試過什麼了? –

+0

是的,WinForm我想要斑馬線在項目的背景 – BlackOpty

回答

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 

;)

+0

它的作品!像往常一樣謝謝你! – BlackOpty

0

斑馬的datagridview的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