05 2011 档案
Windows Explorer中对所选文件增加右键菜单并关联自己程序的例子
摘要:为选中文件注册右键菜单 private void registerFile() { if (this.txtName.Text.Length == 0) return; // 注册到文件 //if (this.ckRegToFile.Checked) //{ RegistryKey shell = Registry.ClassesRoot.OpenSubKey("*", true).OpenSubKey("shell", true); if (shell == null) { shell = Registry.ClassesRoot.OpenSubKey
阅读全文
[转]C# 注册自己的右键菜单 (文件夹/文件)
摘要:一个小小的例子, 演示了如何通过操作注册表, 添加自己的文件或文件夹右键菜单.// 添加到注册表private void btnRegister_Click(object sender, EventArgs e){ if (this.tbMenuTitle.Text.Length == 0) return; // 注册到文件 if (this.ckRegToFile.Checked) { RegistryKey shell = Registry.ClassesRoot.OpenSubKey("*", true).OpenSubKey("shell", t
阅读全文
几种Rounding的区别【wiki】
摘要:yrounddown(towards −∞)roundup(towards +∞)roundtowardszeroroundaway fromzeroroundtonearest+23.67+23+24+23+24+24+23.50+23+24+23+24+23or+24+23.35+23+24+23+24+23+23.00+23+23+23+23+23000000−23.00−23−23−23−23−23−23.35−24−23−23−24−23−23.50−24−23−23−24−23or−24−23.67−24−23−23−24−24
阅读全文
[转]用VS(c#)创建、调试windows service以及部署卸载
摘要:转http://www.cnblogs.com/limei/archive/2010/07/06/1772332.html同事问到windows service的东东,现在整理一下,用c#如何创建一个windows service,以及如何调试、部署、卸载。一、创建windows service1. 打开VS2008,新建一个Project, Project类型选择Visual C#-Windows,在Templates中选择Windows Service, 其他可以默认,点击OK。2. 在Solution Explorer中会看到自动产生了三个文件:app.config, Program.c
阅读全文