Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/vb.net/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Vb.net 使用进度条上载附件_Vb.net_Progress Bar - Fatal编程技术网

Vb.net 使用进度条上载附件

Vb.net 使用进度条上载附件,vb.net,progress-bar,Vb.net,Progress Bar,我有一个xml文件作为附件。我在互联网上搜索过,所有这些都是通过ftp上传的,我不知道如何使用它们发送邮件,所以在上传到邮件时,我如何使用进度条显示 这是我发送电子邮件的代码 Dim smtpServer As New SmtpClient Dim mail As New MailMessage() Dim mailAttachment As Attachment = New Attachment("XMLFile") smtpSe

我有一个xml文件作为附件。我在互联网上搜索过,所有这些都是通过ftp上传的,我不知道如何使用它们发送邮件,所以在上传到邮件时,我如何使用进度条显示

这是我发送电子邮件的代码

        Dim smtpServer As New SmtpClient
        Dim mail As New MailMessage()
        Dim mailAttachment As Attachment = New Attachment("XMLFile")
        smtpServer.UseDefaultCredentials = False
        smtpServer.Credentials = New Net.NetworkCredential("a@ymail.com", "12345")
        smtpServer.Port = 465
        smtpServer.EnableSsl = True
        smtpServer.Host = "smtp.mail.yahoo.com"

        mail = New MailMessage()
        mail.From = New MailAddress("a@ymail.com")
        mail.To.Add("a@ymail.com")
        mail.Subject = "110BackUp"
        mail.IsBodyHtml = False
        mail.Body = "XML FILE"
        mail.Attachments.Add(mailAttachment)
        smtpServer.Send(mail)

如果问题是在发送电子邮件时只有进度条,也许你会发现这很有用