Dim piv As WinForm.PictureViewer = e.Form.Controls("PictureViewer2") Dim name As String = piv.SelectedItem Dim pth As String = ProjectPath & "Attachments\" Dim dlg As New OpenFileDialog dlg.Filter= "图形文件|*.png;*.jpg;"
If dlg.ShowDialog = DialogResult.OK Then piv.DeleteFile(name) FileSys.CopyFile(dlg.FileName,name,True) piv.AddFile(name) End If