Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
Picture Boxes and running out of memory
Im new to VB.NET but have used VB6 quite a bit. Im writing an app with a picture box that I use as an image browser. ie I set the image to a JPEG picture and when the user hits a key i set it to another JPEG picture etc. But after showing about 20 pictures, it seems to run out of memory. Ive tried using Dispose to unload the current image before loading a new one but it doesnt seem to work. Can anyone tell me what i need to do?
This is what my code does repeatedly:
picPicture.Image = Image.FromFile(FileName)
0 · ·