C# Windows7/Vista style ListView

前端 未结 2 1521
你的背包
你的背包 2021-01-02 09:47

when I create a ListView in details view in VS2008, it creates a rather old looking listview. It doesnt have any of the fancy hover effects and cool blue border that (for ex

相关标签:
2条回答
  • 2021-01-02 10:33

    Try calling SetWindowTheme

    Like this:

        [DllImport("uxtheme.dll", ExactSpelling=true, CharSet=CharSet.Unicode)]
        private static extern int SetWindowTheme(IntPtr hwnd, string pszSubAppName, string pszSubIdList);
    
       // The constructor:
       public MyForm() {
          SetWindowTheme(this.listView1.Handle, "Explorer", null);
       } 
    
    0 讨论(0)
  • 2021-01-02 10:42

    Have you checked the Windows API Code Pack? it has many Win7 style controls. I think it has what you want.

    0 讨论(0)
提交回复
热议问题