.net随笔-vb2015 下载与上传文件
作者:互联网
1、下载文件
Imports System.IO
Public Class Form1
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
If My.Computer.Network.IsAvailable Then
SaveFileDialog1.Filter = "ALL Files (*.*)|*.*"
SaveFileDialog1.FileName = Path.GetFileName(TextBox1.Text)
If SaveFileDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then
Dim saveFileName = SaveFileDialog1.FileName
My.Computer.Network.DownloadFile(TextBox1.Text, saveFileName)
End If
End If
End Sub
End Class
标签:End,Sub,SaveFileDialog1,saveFileName,TextBox1,net,上传,vb2015,Network 来源: https://blog.csdn.net/AI_LX/article/details/88954313