If dlg.showDialog = DialogResult.Ok Then '如果用户单击了确定按钮 For Each f As String In dlg.FileNames 'msgbox (filesys.GetName(f) ) Dim file As Io.FileInfo = filesys.GetFileInfo(f) 'msgbox (filesys.GetName(f) & "文件大小:" & file.Length) If file.Length > 1050833 Then msgbox("你选择的文件中,有文件大小超过1M的文件,请修改后在上传!") End If Next msgbox("上传成功!") End If
|