> I wanto to scan a folder and present the images of that folder in panel (I
just know the number of images at run time).
When the user click's one of this images I need to know with was selected
in order to open a new form with this image.
It sounds like you want to show thumbnails of images and then allow the user
to click on a thumbnail to see a large image. Is that correct?
If it is then consider using a ListView.
At run time add your images to an ImageList and use that ImageList for the
LargeImageList property of the ListView. The you can add items to the
ListView during runtime setting each item's image index to be one of the
indexes in the image list.
Then you can use the SelectedIndexChanged event to see when a user has
clicked on a thumbnail.
HTH