This is because you cannot possibly have a file name ending with "
*.jpg; *.gif; *.png
". :-)
By the way, use
string.Format
instead of '&'. Multiple concatenation is bad because strings are
immutable
; each concatenation causes creation of a brand new string and copy operands into it.
[EDIT]
Something like
Me.PictureBox2.ImageLocation = string.Format(
"{0}{1}{2}",
Application.StartupPath,
System.IO.Path.DirectorySeparatorChar,
FileListBox1.SelectedItem.ToString);
See
http://msdn.microsoft.com/en-us/library/system.string.aspx[
^].
[END EDIT]
—SA