摘要: public class OptionServices { //安装服务 public static void InstallService(string filepath, string serviceName, string[] options) { try { if (!IsServiceEx... 阅读全文
posted @ 2013-09-24 08:55 E1ement 阅读(354) 评论(0) 推荐(0) 编辑
摘要: 摘自:http://www.cnblogs.com/tom-tong/archive/2012/03/12/2392173.html public static int GetOSBit() { ... 阅读全文
posted @ 2013-09-23 14:29 E1ement 阅读(359) 评论(0) 推荐(1) 编辑
摘要: 原文地址:http://www.cnblogs.com/feishu/archive/2010/05/08/1730797.html1234567891011121314usingSystem.Runtime.InteropServices; [DllImport("User32.dll", CharSet = CharSet.Auto)] publicstaticexternintGetWindowThreadProcessId(IntPtr hwnd, outintID); protectedvoidButton1_Click(objectsender, EventAr 阅读全文
posted @ 2013-09-12 16:48 E1ement 阅读(275) 评论(0) 推荐(0) 编辑
摘要: 利用.Net中Process类调用netstat命令来判断计算端口的使用情况:Processp=newProcess();p.StartInfo=newProcessStartInfo("netstat","-a");p.StartInfo.CreateNoWindow=true;p.StartInfo.UseShellExecute=false;p.StartInfo.WindowStyle=ProcessWindowStyle.Hidden;p.StartInfo.RedirectStandardOutput=true;p.Start();strin 阅读全文
posted @ 2013-09-03 17:00 E1ement 阅读(242) 评论(0) 推荐(0) 编辑
摘要: http://blog.csdn.net/vchao13/article/details/6200255 1、获取指定目录下所有文件信息 /// ///返回指定目录下所有文件信息 /// ///目录字符串 /// publicListGetAllFilesInDirect... 阅读全文
posted @ 2013-08-15 15:05 E1ement 阅读(286) 评论(0) 推荐(0) 编辑
摘要: 1 新建安装部署项目打开VS2005,点击新建项目,选择:其他项目类型->安装与部署->安装向导(安装项目),然后点击确定。2 安装向导关闭后打开安装向导,点击下一步,或者直接点击完成。3 开始制作安装向导完成后即可进入项目文件夹:双击"应用程序文件夹"在右边的空白处右击,选择添加->文件,将你的做... 阅读全文
posted @ 2013-08-13 16:33 E1ement 阅读(716) 评论(0) 推荐(0) 编辑
摘要: public partial class Transwindow : UserControl { public Transwindow() { InitializeComponent(); SetStyle(ControlStyles.SupportsTransparentBackColor | ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint | ControlStyles.Opaque, true); this.BackColor = Color.Transparent; } protected override C. 阅读全文
posted @ 2013-08-13 15:32 E1ement 阅读(126) 评论(0) 推荐(0) 编辑
摘要: Home:http://www.icsharpcode.net/opensource/sharpziplib/ 转至:https://github.com/leowangzi/DanielLib/blob/master/DanielLib.Utilities/ZipHandler/Sharp... 阅读全文
posted @ 2013-08-07 18:17 E1ement 阅读(355) 评论(0) 推荐(0) 编辑
摘要: 转载自: http://blog.csdn.net/wowolook/article/details/8077153 最近又被ms的编译选译纠结了一下,运行程序是老是弹出0x14b1 or 71 这类的错误,,之前也遇到过,不过都很快解决,这次花了好几个小时,也是以前从来总结的结果,今天... 阅读全文
posted @ 2013-08-06 10:36 E1ement 阅读(1240) 评论(0) 推荐(1) 编辑
摘要: sql语句查询分类前几条信息1.SQL2005,情况下使用 行号 Row_Number()SELECT * FROM ( SELECT ROW_NUMBER() OVER(PARTITION BY ct ORDER BY name) AS rnk,* FROM tb_name ) AS t WHERE rnk(SELECT COUNT(*) FROM tb_name WHERE ct=t.ct AND name>t.name);讲解:关键是子查询,这里类似一个while循环,每条记录去匹配和它同类的下一条记录。计算以它开始算起记录条数,意思就是他当前所在的行号,当行号小于3... 阅读全文
posted @ 2013-07-28 09:58 E1ement 阅读(183) 评论(0) 推荐(0) 编辑