下载网页

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("下载成功......","成功");  ...

进度条的应用

  private void timer1_Tick(object sender, EventArgs e)//应用了时间函数,类似中断  {  if (sender == timer1)  {  if (progressBar1.Value >= 100)  {  progressBar1.Value = 0;//value是进度条的长度  ...

MessageBox

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