How can I remove the selection border on a ListViewItem

后端 未结 6 2137
粉色の甜心
粉色の甜心 2020-12-17 22:04

I\'m using SetWindowTheme and SendMessage to make a .net listview look like a vista style listview, but the .net control still has a dotted selection border around the selec

6条回答
  •  北海茫月
    2020-12-17 22:10

    It does not seem that there is a particular way to change ListViewItem styles using Windows Forms.

    Sometimes there is no way to change some Win32 control behaviors using managed code. The only way is to do some P/Invoke to modify specific behaviors. I find this really tricky but you have no other choice. I often faced this situation when developing Windows Mobile UIs (justly with ListView).

    So I have no direct answer to your question but I am pretty sure that if it is not possible using Windows Forms, you can surely do with P/Invoke. The only clues I can give you:

    • Platform Invoke Tutorial
    • List View documentation

提交回复
热议问题