Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click OpenFileDialog1.ShowDialog() OpenFileDialog1.CheckFileExists = True OpenFileDialog1.Filter = "All Files (*.*)|*.*" Dim size As System.IO.FileInfo If OpenFileDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then For Each File As String In OpenFileDialog1.FileNames Dim attch As New Net.Mail.Attachment(File) size = My.Computer.FileSystem.GetFileInfo(File) ListBox1.Items.Add(Path.GetFileName(File & "(" & Convert.ToInt32(size.Length()) & "bytes)")) mail.Attachments.Add(attch) Next End If End Sub
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)