iTz_Mercury

Aero Listview - Credits to Nathan from HF

Dec 10th, 2012
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.66 KB | None | 0 0
  1. using System;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. using System.Data;
  5. using System.Diagnostics;
  6. using System.Runtime.InteropServices;
  7. using Microsoft.VisualBasic;
  8. using System.Windows.Forms;
  9.  
  10. public class AeroListView : ListView
  11. {
  12.  
  13.     [DllImport("uxtheme", CharSet = CharSet.Unicode)]
  14.     public static extern int SetWindowTheme(IntPtr hWnd, string textSubAppName, string textSubIdList);
  15.  
  16.     public AeroListView()
  17.     {
  18.         HandleCreated += AreoListView_HandleCreated;
  19.         this.DoubleBuffered = true;
  20.     }
  21.  
  22.     private void AreoListView_HandleCreated(object sender, System.EventArgs e)
  23.     {
  24.         SetWindowTheme(this.Handle, "explorer", null);
  25.     }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment