(已经解决,谢谢)请教大家个问题:
上传照片按钮代码如何限制上传照片尺寸(800*600)?免得服务器爆掉!
Dim CurRow As Row = Tables("学生信息表").Current
Dim xueh As String = CurRow("学号")
Dim ftp1 As new ftpclient
ftp1.host="***"
ftp1.Account = "***"
ftp1.password = "***"
ftp1.RootDir = "\photo\" & xueh & "\" '根目录已经创建,设置根目录
Dim dlg As New openFileDialog '定义一个新的SaveFileDialog
dlg.MultiSelect = True
If dlg.showDialog = DialogResult.Ok Then '如果用户单击了确定按钮
For Each f As String In dlg.FileNames
If ftp1.Upload(f,"/" & filesys.GetName(f) , True) = True Then
Messagebox.show(dlg.FileName & "上传完成!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
Else
Messagebox.show(dlg.FileName & "上传失败!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
End If
Next
ftp1.Close
End If
[此贴子已经被作者于2019/3/23 18:57:54编辑过]