下载网页

using System.Net;using System.IO;private void button1_Click(object sender, EventArgs e){  string URL=textBox1.Text;  try  {  this.Text=URL+"......下载中";  client.DownloadFile(URL, textBox3.Text);  MessageBox.Show("下载成功......","成功");  ...
2009-07-07 20:42 | 阅读 1838 次 | 评论 0 条

进度条的应用

  private void timer1_Tick(object sender, EventArgs e)//应用了时间函数,类似中断  {  if (sender == timer1)  {  if (progressBar1.Value >= 100)  {  progressBar1.Value = 0;//value是进度条的长度  ...
2009-07-07 20:41 | 阅读 1503 次 | 评论 0 条

MessageBox

1、 MessageBox的应用DialogResultdr=MessageBox.Show("hello,world","messagebox",MessageBoxButtons.YesNoCancel,MessageBoxIcon.Exclamation,MessageBoxDefaultButton.Button2,MessageBoxOptions.RtlReading); if (dr == DialogResult.Yes)  {  ////  }注:button2表示的是默认按钮  ...
2009-07-07 20:40 | 阅读 1414 次 | 评论 0 条
文章归档
最新评论