摘要: 1.通过注册表获取,缺点,兼容性差1 //RegistryKey userKey = Registry.CurrentUser;2 //RegistryKey key = userKey.OpenSubKey(@"RemoteAccess\Profile");3 //string[] keysList = key.GetSubKeyNames();//获取当前创建的adsl宽带列表2.通过api获取,兼容性比上面好#region 获取adsl所有宽带连接名称[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto 阅读全文
posted @ 2011-07-29 20:41 事理 阅读(2401) 评论(0) 推荐(1)
摘要: 1.第一种,不安全,当线程过多后,timer控件和线程中同时访问窗体控件时,有时会出现界面重绘出错。public frmMain() { InitializeComponent(); System.Windows.Forms.Control.CheckForIllegalCrossT... 阅读全文
posted @ 2011-07-29 20:37 事理 阅读(12423) 评论(5) 推荐(2)
摘要: 可识别一些简单验证码//google的tesseract识别,导入tessnet2_32.dll,识别速度不如ocrprivate void button27_Click(object sender, EventArgs e){ if (pictureBox3.Image != null) { Bitmap map = (Bitmap)pictureBox3.Image; tessnet2.Tesseract ocr = new tessnet2.Tesseract();//声明一个OCR类 string txt = ""; ... 阅读全文
posted @ 2011-07-29 20:23 事理 阅读(5358) 评论(1) 推荐(0)
摘要: 可识别一些简单验证码//http://www.cnblogs.com/longbo///可识别字母数字和符号[DllImport("AspriseOCR.dll", EntryPoint = "OCR")]public static extern IntPtr OCR(string file, int type);//识别条形码[DllImport("AspriseOCR.dll", EntryPoint = "OCRBarCodes")]static extern IntPtr OCRBarCodes(strin 阅读全文
posted @ 2011-07-29 20:22 事理 阅读(8117) 评论(0) 推荐(0)
摘要: 于网上搜索的c#拨号代码总是会弹出拨号连接的界面,基本等于无用,现在给出一段代码,经过本人的调试,完全可以实现自动ADSL拨号,昨夜测试完成后,不敢独享。具体用途,各位自己决定吧代码中使用了指针,因此,需要在编译的时候添加/unsafe编译选项 1 [DllImport("r... 阅读全文
posted @ 2011-07-29 20:11 事理 阅读(363) 评论(0) 推荐(0)