Deals with one specific application. I have a 5 camera Cognex In-Sight and 5xHMI T15B. Driver on Cognex works great. Now cameras stores images in a ftp HMI. Now I need to be able to select an image and display it on HMI.
My idea was that i choose a picture from ListBox. Click on Button and the picture
which I have chosen appear to me in PictureBox.
Problem is That I Can not Fill the list box with the names of the current images stored in Project Files and then to show in PictureBox
I try>
Code: Select all
DirectoryInfo dinfo = new DirectoryInfo(@"\FlashDrive\Project\Project Files")
FileInfo[] Files = dinfo.GetFiles("*.jpg");
foreach( FileInfo file in Files )
{
ListBox2.Items.Add(file.Name);
}
JohnCZ