Hi Alls,

I'm need your help regarding this issues. What i'm try to do is when updating or insert command done,the color will follow. like below :-

if dr.true then

fcmd.executenonquery
listbox1.items.add ("Good")
Listbox1.forecolor = color.green

else
gcmd.executenonquery
listbox1.items.add("Bad")
Listbox1.forecolor = color.red

end if

but unfortunately when the color cahnge it will effect the both up line....can anyone hel me..tq

You have to use a ListView in details view if you want to use different colours for each line. You can do it as follows:

Dim item as New ListViewItem()
item.Text = "Bad"
item.ForeColor = Color.Red
ListView1.Items.Add(item)
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.