上一页 1 ··· 61 62 63 64 65
摘要: public double GetProcessUsedMemory() { double usedMemory = 0; usedMemory = Process.GetCurrentProcess().WorkingSet64 / 1024.0 / 1024.0; return usedMemory; } 阅读全文
posted @ 2009-06-01 09:31 94cool 阅读(453) 评论(0) 推荐(0)
摘要: 不用的数据尽量及时销毁,以收回内存占用。如果调用了COM组件、数据库等,那就及时关闭以避免资源泄漏。其实.net程序占用内存比较正常,如果确定没有泄漏的地方可以不用理会。这里有个治标不治本的方法,使用API来减少内存占用:[DllImport("kernel32",EntryPoint="SetProcessWorkingSetSize", ExactSpelling=true, CharSet=... 阅读全文
posted @ 2009-06-01 09:30 94cool 阅读(2137) 评论(0) 推荐(1)
摘要: 1. Filter概述Filter是一个COM组件,由一个或多个Pin组成。Pin也是一个COM组件。Filter文件的扩展名为.ax,但也可以是.dll。Filter根据其包含Input pin或Output pin的情况(或在Filter Graph的位置),大致可分为三类:Source Filter(仅有Output pin)、Transform Filter(同时具有Input pin和... 阅读全文
posted @ 2009-05-31 20:30 94cool 阅读(576) 评论(0) 推荐(0)
摘要: using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using System.Text.RegularExpressions; name... 阅读全文
posted @ 2009-05-31 17:51 94cool 阅读(1338) 评论(1) 推荐(0)
摘要: public bool FileWrite(string path,StringBuilder sb) { FileStream fs =null; StreamWriter sw=null; try { fs = new FileStream(@"c:\test.t... 阅读全文
posted @ 2009-05-26 17:02 94cool 阅读(173) 评论(0) 推荐(0)
摘要: 获取歌词并排序: ArrayList LrcArr = new ArrayList(); private void LoadLyric(string LrcStr) { string[] listArr = LrcStr.Split('\n'); Regex reg = new Regex(@"[[0-5][0-9]:... 阅读全文
posted @ 2009-05-26 17:00 94cool 阅读(293) 评论(0) 推荐(0)
摘要: 纯C#钩子(Hook)实现要实现系统钩子其实很简单,调用三个Win32的API即可。SetWindowsHookEx 用于设置钩子。(设立一道卡子,盘查需要的信息) [DllImport("user32.dll",CallingConvention=CallingConvention.StdCall)]publicstaticexternIntPtrSetWindowsHookEx(WH_Code... 阅读全文
posted @ 2009-05-26 10:28 94cool 阅读(369) 评论(0) 推荐(0)
摘要: 在VS2005下用C++写的程序,在一台未安装VS2005的系统上,用命令行方式运行,提示:“系统无法执行指定的程序”直接双击运行,提示:“由于应用程序的配置不正确,应用程序未能启动,重新安装应用程序可能会纠正这个问题”以前用VC6和VS2003的话, 如果缺少库文件,是会提示缺少“**.dll”,但是用VS2005却没有这样... 阅读全文
posted @ 2009-05-21 21:41 94cool 阅读(1424) 评论(0) 推荐(0)
摘要: AS2时,可以直接把参数加在flash的尾部,如:demo.swf?u1=good&u2=bad在flash里就默认u1,u2为根变量。可以使用_root.u1和_root.u2来得到值但到了AS3里面这样做已经不行了。要用到flash.display.loaderInfo类的parameters属性,返回的是一个参数对象使用方法:例如在文档类中定义var param:Object = r... 阅读全文
posted @ 2009-05-21 21:39 94cool 阅读(781) 评论(0) 推荐(0)
摘要: 1.让文字不停地滚动 <MARQUEE>滚动文字</MARQUEE> 2.记录并显示网页的最后修改时间 <script language=Javascript> document.write("最后更新时间: " + document.lastModified + "") </script> 3.关闭当前窗口 <a href="/"onClick="javascr... 阅读全文
posted @ 2009-05-21 21:05 94cool 阅读(213) 评论(0) 推荐(0)
上一页 1 ··· 61 62 63 64 65