display pictures from a folder

  • Thread starter Thread starter karim
  • Start date Start date
K

karim

Hello all,
Is there a simple cod in vb 2008 to find a folder on a network and open
a picture from that folder inside the form?

thanks for any of your help.
 
Hello all,
     Is there a simple cod in vb 2008 to find a folder on a networkand open
a picture from that folder inside the form?

thanks for any of your help.

You can use the System.IO.Directory class to find the particular file,
and then depending on what you mean by "open a picture" you can load
the image onto your form or open it with the default program by using
System.Diagnostics.Process.Start(...)

Thanks,

Seth Rowe [MVP]
http://sethrowe.blogspot.com/
 
Hello all,
     Is there a simple cod in vb 2008 to find a folder on a networkand open
a picture from that folder inside the form?

thanks for any of your help.

If you're meaning of simply running a file regardless of its
extenstion, you can use System.Diagnostics.Process.Start passing
proper arguments.

If you just want to display image files on your form, use PictureBox
control on your form and you can load images dynamically using
Picturebox's ImageLocation property.

' Like:
PictureBox1.ImageLocation = "c:\file.jpg"

Hope this helps,

Onur Güzel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top