Possible Duplicate:
How can I remove the selection border on a ListViewItem
I’m using the following code to make a Listview to use windows 7 native look and to prevent flickering.
Windows 7 Native Look for .NET ListView
http://geekswithblogs.net/CPound/archive/2006/02/27/70834.aspx
But I’m still getting a black dotted selection rectangle.


The question will be… How can I achieve the explorer selection rectangle?
Thank you so much for your help.
Based on the comment in the link provided by AVIDeveloper.
I tried to find some information about this messages and eventualy saw this post: http://cboard.cprogramming.com/csharp-programming/128345-listview-remove-focuscues.html#post958690
So, we need to send the WM_CHANGEUISTATE message to the ListView in the constructor
And we are only going to override the OnSelectedIndexChanged and OnEnter events.
Without overriding the OnEnter event, the same black dotted selection rectangle will appear when the ListView gets the focus.
I tried to explain the best I could since I’m not a fluent English speaker and I’m going to wait if someone has a better answer before accepting mine.