I can deal with that if I know the number of images to create.
Let me explain better:
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.
Thanks in advance
Luis
"elziko" wrote:
[color=blue][color=green]
> > If I create several controls (images) at run time, how can I handle the
> > click
> > event of this controls.[/color]
>
> Use the AddHandler statement:
>
> AddHandler TheObject.TheEv ent, AddressOf TheProcedureToH andleEvent
>
> HTH
>
>
>[/color]
> I wanto to scan a folder and present the images of that folder in panel (I[color=blue]
> 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.[/color]
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 SelectedIndexCh anged event to see when a user has
clicked on a thumbnail.
"elziko" wrote:
[color=blue][color=green]
> > 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.[/color]
>
> 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 SelectedIndexCh anged event to see when a user has
> clicked on a thumbnail.
>
> HTH
>
>
>[/color]
Comment