allyc

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2013年9月5日

摘要: 1 using System; 2 using System.Collections.Generic; 3 using System.ComponentModel; 4 using System.Data; 5 using System.Drawing; 6 using System.Text; 7 using System.Windows.Forms; 8 using System.IO; 9 using System.Threading;10 11 namespace MultiThread12 {13 public partial class Form1 : Form14 ... 阅读全文
posted @ 2013-09-05 20:46 allyc 阅读(3281) 评论(0) 推荐(0)

摘要: 1 private void lbllink_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) 2 { 3 4 //调用IE浏览器5 System.Diagnostics.Process.Start("iexplore.exe", "http://www.google.cn"); 6 7 //调用系统默认的浏览器8 System.Diagnostics.Process.Start( "http://www.g... 阅读全文
posted @ 2013-09-05 16:52 allyc 阅读(976) 评论(0) 推荐(1)

2013年9月4日

摘要: 我们在做winform应用的时候,大部分情况下都会碰到使用多线程控制界面上控件信息的问题。然而我们并不能用传统方法来做这个问题,下面我将详细的介绍。 首先来看传统方法: 1 public partial class Form1 : Form 2 { 3 public Form1() 4 { 5 InitializeComponent(); 6 } 7 private void Form1_Load(object sender, EventArgs e) 8 { 9 ... 阅读全文
posted @ 2013-09-04 13:46 allyc 阅读(245) 评论(0) 推荐(0)

摘要: 1 HttpWebRequest hwr = (HttpWebRequest) WebRequest.Create("http://www.baidu.com"); 2 3 hwr.AllowAutoRedirect = false; //不允许重定向 4 5 hwr.Timeout = 10000; //连接超时时间设置 6 7 hwr.Method = "GET"; //协议:GET、HEAD、POST、PUT、DELETE、TRACE 或OPTIONS。 8 9 try10 11 {12 13 HttpWebResponse hwrs = (Htt 阅读全文
posted @ 2013-09-04 11:00 allyc 阅读(913) 评论(0) 推荐(0)