Hi, I have a program that lets the user open a picture and make changes to it, but when trying to save the picture, it says that the file is currently in use and cannot be saved. Is there any way around this? Thanks!
Private Sub btnPic_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPic.Click
Open dialog box to import a picture
With ofd
.CheckFileExists = True
.CheckPathExists = True
.Filter = "Images|*.bmp;*.tiff;*.jpg;*.jpeg;*.png;"
.Multiselect = False
.ShowHelp = False
.Title = "Select an Image"
End With
If ofd.ShowDialog() = DialogResult.OK Then
Dim tmpBMP As New Bitmap(ofd.FileName)
CoverPic.Image = tmpBMP
End If
End Sub
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.