摘要: http://www.cnblogs.com/Interkey/p/RunAsAdmin.html 阅读全文
posted @ 2017-03-20 14:10 c#菜鸟之行 阅读(491) 评论(0) 推荐(0) 编辑
摘要: http://www.cnblogs.com/hongmaju/p/3763385.html http://www.cnblogs.com/taixihuase/p/5605197.html 北京时间 阅读全文
posted @ 2017-03-20 11:28 c#菜鸟之行 阅读(1225) 评论(0) 推荐(0) 编辑
摘要: 你知道图像的指针,如果知道图像大小,就可以用IntPtr img = (IntPtr) pics[ i ];byte[] data = new byte[picLength];Marshal.Copy(img, data, 0, data.length);using(MemoryStream ms  阅读全文
posted @ 2017-03-19 11:42 c#菜鸟之行 阅读(3152) 评论(0) 推荐(0) 编辑
摘要: 特别是针对循环或timer处理中需要在窗体控件显示数据时,因后台处理过度繁忙而出现没刷新或者假死现象时,可以使用 Application.DoEvents(); Application.DoEvents()的作用 测试了一下,没有Application.DoEvents()的时候,Label基本处于 阅读全文
posted @ 2017-03-01 09:44 c#菜鸟之行 阅读(1683) 评论(0) 推荐(0) 编辑
摘要: http://www.cnblogs.com/kissazi2/p/3389551.html 转载 自己看 阅读全文
posted @ 2017-02-27 13:53 c#菜鸟之行 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 需要设置子线程 ApartmentState 为 STA 模式,但 Task 又不能直接设置 ApartmentState,因此需要用 Thread 来封装一下。 阅读全文
posted @ 2017-02-26 12:20 c#菜鸟之行 阅读(2764) 评论(1) 推荐(0) 编辑
摘要: 原文http://bbs.csdn.net/topics/390918257 真牛逼哈 Process.GetProcessesByName("aaa")[0].MainWindowHandle ; Process.GetProcessById(11).MainWindowHandle; 阅读全文
posted @ 2017-02-23 16:28 c#菜鸟之行 阅读(5831) 评论(3) 推荐(1) 编辑
摘要: 挺不错的方法,先网摘过来留个记号http://blog.csdn.net/conmajia/article/details/7831251 阅读全文
posted @ 2017-02-23 12:24 c#菜鸟之行 阅读(749) 评论(0) 推荐(0) 编辑
摘要: 在C# WebBrowser控件插入JS代码,并执行! WPF的WebBrowser和WinForm的WebBrowser有一定区别。 要向其中注入javascript脚本,经过本人试验,下面一条路可以走通: 该方法还可以注入javascript函数,在需要的时候调用 Browser.InvokeS 阅读全文
posted @ 2017-02-21 11:32 c#菜鸟之行 阅读(12863) 评论(0) 推荐(0) 编辑
摘要: using System; using System.Collections.Generic; using System.Drawing; using System.Drawing.Imaging; using System.Runtime.InteropServices; using System.Text; using System.Windows.Forms; namespace Ge... 阅读全文
posted @ 2017-02-11 13:04 c#菜鸟之行 阅读(9759) 评论(1) 推荐(1) 编辑