07 2017 档案
摘要:刚开始我认为可以使用trimer控件就可以实现了,但是使用后才知道,把trimer设置为100微秒时,整个窗体就会不停的在加载中,无法用了= = 这个使用就只能使用线程加载了和委托赋值了 //CPU使用率 GetInfo getinfo = new GetInfo(userPercent,RAM);
阅读全文
摘要:[System.Runtime.InteropServices.DllImport("kernel32")] private static extern long WritePrivateProfileString(string section, string key, string val, st
阅读全文
摘要:[DllImport("user32.dll")] public extern static int GetWindowText(IntPtr hWnd, StringBuilder lpString, int nMaxCount); /// <summary> /// 打开ppt文件 /// </
阅读全文
摘要:在网页中添加对应的JS <script type="text/javascript"> window.onload=function(){ var btn=document.getElementById('btnCallCSharpMethod'); //网页中触发事件的控件idbtn.onclic
阅读全文
摘要:= =这个之前我是使用kill,遍历所有的进程,寻找到进程名后关闭,但是这个不知道为什么,在运行的程序中使用这个kill,功能是没有什么问题的,但是写在Program.cs中,软件开始时,貌似有点问题,有时候是kill不了的。 于是使用FindWindow()和SendMessage(),就能比较好
阅读全文
摘要://自动生成二维码 //link是需要生成二维码的链接 private Bitmap GetQRCode(string link) { Bitmap QRCode=null; try { QRCodeEncoder qrCodeEncoder = new QRCodeEncoder(); qrCod
阅读全文
摘要:public static string GetTimeStamp(System.DateTime time) { System.DateTime startTime = TimeZone.CurrentTimeZone.ToLocalTime(new System.DateTime(1970, 1
阅读全文

浙公网安备 33010602011771号