Out of memory Error in VB.net Picture box?

RjSowden

New member
I am making an app that takes a screen shot of a remote desktop and then displays it on the local desktop. the image transmission is fine (I can see the image perfectly well in MS paint and others)
However, when i try to get the application to read the file and put it in a picture box, it casts an Out Of Memory exception.
The code i am using to display it is below
Image_View.Show()
Image_View.PictureBox1.Image = Image.FromFile(System.AppDomain.CurrentDomain.BaseDirectory() & "\Recieved.png")

How can i stop it casting the Out of memory exception. The file i am trying to display is only 300kb and the system has 2GB of RAM.

Thanks in advance
 
Back
Top