Nobody seems to be interested in setting up a ListView to support Grid Line Color . I tried this one and want to share it here. This is not very good with a little flicker (not very much) when you are viewing ListView items. However, this is acceptable. I think I lack win32 knowledge here to make it more perfect:
public class CustomListView : ListView { bool scrollDown; int lastScroll; public Color GridLinesColor {get;set;} [DllImport("user32")] private static extern int GetScrollPos(IntPtr hwnd, int nBar); public CustomListView(){ GridLinesColor = Color.Red; DoubleBuffered = true; base.GridLines = false;
UPDATE:. Thanks to Cody Gray's suggestion, I added code to handle horizontal scrolling. I use GetScrollPos for simplicity because, as recommended on the MSDN documentation page, GetScrollInfo should be used GetScrollInfo .

King king
source share