nniixl
 1 Ping pingSender = new Ping();
 2 try
 3 {
 4     PingReply reply = pingSender.Send(this.txtIp.Text.ToString());
 5     if (reply.Status == IPStatus.Success)
 6     {
 7         MessageBox.Show("OK");
 8     }
 9           else
10           {
11               MessageBox.Show("fail");
12           }
13       }
14       catch (System.Exception ex)
15       {
16           MessageBox.Show(ex.Message);
17           return;
18       }
19 }            
20             
21 、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、
22 try
23 {
24     WebClient webClient = new WebClient();
25     webClient.DownloadFile("http://images.com/123.jpg""123.jpg");
26     this.picShow.Image = Image.FromFile("123.jpg");
27 }
28 catch (Exception ex)
29 {
30     MessageBox.Show(ex.Message);    
31 }

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2021-12-03
  • 2021-08-06
  • 2021-07-19
  • 2021-03-06
猜你喜欢
  • 2021-05-17
  • 2022-12-23
  • 2021-06-20
  • 2021-09-02
  • 2021-09-26
  • 2021-12-30
  • 2021-12-18
相关资源
相似解决方案