自动草稿

机能如是说:

[C]自订修正配置文档色调及工具栏

自订修正配置文档的色调、和自订相片修正配置文档的工具栏

自订修正配置文档色调及工具栏.主要就的机能同时实现

1、同时实现修正文档工具栏色调:流程内建14种相同色调的配置文档工具栏片断,能民主自由修正相同的配置文档色调

2:自订修正配置文档工具栏:具体来说将相片片断转化成ico工具栏片断,再将工具栏片断设成配置文档色调

主要就源标识符:

修正配置文档工具栏关键性标识符:

private void FolderColor(string strFile)

{

LPSHFOLDERCUSTOMSETTINGS FolderSettings = new LPSHFOLDERCUSTOMSETTINGS();

FolderSettings.dwMask = 0x10;

FolderSettings.pszIconFile = strFile;

//FolderSettings.pszIconFile = @”{icon C:\Users\gy\Desktop\ng.ico}”; ;

FolderSettings.iIconIndex = 0;

UInt32 FCS_READ = 0x00000001;

UInt32 FCS_FORCEWRITE = 0x00000002;

//UInt32 FCS_WRITE = FCS_READ | FCS_FORCEWRITE;

UInt32 FCS_WRITE = FCS_FORCEWRITE;

string pszPath = textBox1.Text;

UInt32 HRESULT = SHGetSetFolderCustomSettings(ref FolderSettings, pszPath, FCS_WRITE);

//Console.WriteLine(HRESULT.ToString(“x”));

//Console.ReadLine();

}

[DllImport(“Shell32.dll”, CharSet = CharSet.Auto)]

static extern UInt32 SHGetSetFolderCustomSettings(ref LPSHFOLDERCUSTOMSETTINGS pfcs, string pszPath, UInt32 dwReadWrite);

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]

struct LPSHFOLDERCUSTOMSETTINGS

{

public UInt32 dwSize;

public UInt32 dwMask;

public IntPtr pvid;

public string pszWebViewTemplate;

public UInt32 cchWebViewTemplate;

public string pszWebViewTemplateVersion;

public string pszInfoTip;

public UInt32 cchInfoTip;

public IntPtr pclsid;

public UInt32 dwFlags;

public string pszIconFile;

public UInt32 cchIconFile;

public int iIconIndex;

public string pszLogo;

public UInt32 cchLogo;

}

相片片断转ico工具栏标识符:

public static bool ConvertImageToIcon(string origin, string destination, Size iconSize)

{

if (iconSize.Width

1.本站所有资源来源于用户上传和网络,如有侵权请邮件联系站长!
2.分享目的仅供大家学习和交流,您必须在下载后24小时内删除!
3.不得使用于非法商业用途,不得违反国家法律。否则后果自负!
4.本站提供的源码、模板、插件等其他资源,都不包含技术服务请大家谅解!
5.如有链接无法下载或失效,请联系管理员处理!
6.本站资源售价只是赞助,收取费用仅维持本站的日常运营所需!