Windows 7的原生查找.NET的ListView [英] Windows 7 Native Look for .NET ListView
本文介绍了Windows 7的原生查找.NET的ListView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
目前,我的列表视图看起来像这样:
Currently, my ListViews look like this:
我怎样才能做到这一点的Windows 7低于本机的外观?
How can I achieve that Windows 7 native look below?
推荐答案
这是在这里找到答案:<一href="http://stackoverflow.com/questions/5131534/how-to-get-windows-native-look-for-the-net-treeview">How让Windows本机的外观为.NET的TreeView?
This was answered here: How to get Windows native look for the .NET TreeView?
给出的解决方案,为ListView和树视图既可以用于。
The given solution works for both for the ListView and the TreeView.
public class NativeListView : System.Windows.Forms.ListView
{
[DllImport("uxtheme.dll", CharSet = CharSet.Unicode)]
private extern static int SetWindowTheme(IntPtr hWnd, string pszSubAppName,
string pszSubIdList);
protected override void CreateHandle()
{
base.CreateHandle();
SetWindowTheme(this.Handle, "explorer", null);
}
}
这篇关于Windows 7的原生查找.NET的ListView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文