Public Sub Add_In_ListView(ByVal Field1 As String, ByVal Field2 As String, ByVal Field3 As String, ByVal Field4 As String, ByVal Field5 As String, ByVal Field6 As String, ByVal Field7 As Boolean) lv = ListView1.Items.Add(Field1) lv.SubItems.Add(Field2) lv.SubItems.Add(Field3) lv.SubItems.Add(Field4) lv.SubItems.Add(Field5) lv.SubItems.Add(Field6) If Field7 = True Then lv.SubItems.Add(6).Text = "Enable" lv.SubItems(6).ForeColor = Color.Green Else lv.SubItems.Add(6).Text = "Disable" lv.SubItems(6).ForeColor = Color.Red End If lv.SubItems.Add("") lv.SubItems.Add("") lv.SubItems.Add("") lv.SubItems.Add("") lv.SubItems.Add("") ListView1.Refresh() End Sub
lv.UseItemStyleForSubItems = False
ListViewItem
lv
UseItemStyleForSubItems
false
ForeColor
BackColor
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)