Solved

vb.net - load image

Posted on 2010-08-14
2
291 Views
Last Modified: 2012-06-27
hello there,
how can I make something so that I can load an image into memory then display it on a picturebox..
because if I load the image into picturebox fromfile I cant edit the image because its in use..
0
Comment
Question by:XK8ER
2 Comments
 
LVL 17

Expert Comment

by:Zhaolai
Comment Utility
You can use ImageList to store a collection of images either at design time or run time and use it any where in your app.

0
 
LVL 85

Accepted Solution

by:
Mike Tomlinson earned 500 total points
Comment Utility
"...because if I load the image into picturebox fromfile I cant edit the image because its in use..."

Instead of FromFile() use FromStream() which does NOT leave the file locked.

Simple example:

    Dim fs As New System.IO.FileStream("c:\some\path\image.jpg", IO.FileMode.Open)
    PictureBox1.Image = Image.FromStream(fs)
    fs.Close()
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now