The usual solution given is to make a (memory) copy of the image before using it with a picturebox, e.g.
Dim bmp as Bitmap = Nothing
Using img as Image = Image.FromFile(fileName)
bmp = new Bitmap(img)
End Using
pnLogo.BackgroundImage = bmp
But, if you want to keep the code you already have, just dispose the image in the picturebox to unlock the file:
pnLogo.BackgroundImage.Dispose()
pnLogo.BackgroundImage = Nothing