Problem refreshing picture box

lion8420

Member
Joined
Sep 11, 2012
Messages
11
Programming Experience
1-3
I have tried numerous solutions to this problem but I think I am missing something at the fundamental level.

I have a picture box that does not have an image displayed.

You click the box which opens a second form for selection and cropping of an image.
The second form sets a property for the location of the saved image file.

You close the second form and load the image into the original picturebox.
The image is there but it requires you to click on the picture box to display it. It needs to be refreshed but when I call picturebox.refresh or form.refresh nothing happens.

I really don't know what to do at this point. I would like the picture box to refresh with out requiring a click

Thanks
 
Private Sub picProfile_Click(sender As Object, e As EventArgs) Handles picProfile.Click
Dim imageform As New PicForm
imageform.Show()
loadImage()
End Sub

Private Sub loadImage()
If AccessImageLoc <> "" Then
Dim LdImage As Image
LdImage = Image.FromFile(AccessImageLoc)
picProfile.Image = LdImage
LdImage.Dispose()

End If
End Sub

I left out the picProfile.refresh because it had no effect
 
Well I solved the problem but honestly I have tried so many things and drank so much AMP I don't actually know what fixed it.
 
Back
Top