Class IconHelper
获取文件关联图标
public class IconHelper
- Inheritance
-
IconHelper
- Inherited Members
- Extension Methods
Properties
Instance
创建指定对象的单例实例
public static IconHelper Instance { get; }
Property Value
Methods
GetDirectoryIcon()
获取文件夹图标
public Icon GetDirectoryIcon()
Returns
GetFileIcon(string)
获取文件图标
public Icon GetFileIcon(string p_Path)
Parameters
p_Path
string
Returns
GetSystemInfoIcon(string)
获取系统图标
public Icon GetSystemInfoIcon(string p_Path)
Parameters
p_Path
string
Returns
SHGetFileInfo(string, uint, ref SHFILEINFO, uint, uint)
返回系统设置的图标
public static extern nint SHGetFileInfo(string pszPath, uint dwFileAttributes, ref SHFILEINFO psfi, uint cbSizeFileInfo, uint uFlags)
Parameters
pszPath
string文件路径 如果为"" 返回文件夹的
dwFileAttributes
uint0
psfi
SHFILEINFO结构体
cbSizeFileInfo
uint结构体大小
uFlags
uint枚举类型
Returns
- nint
-1失败