Create dymamically picturebox with events.
I want to load all picture files contained in a folder. I created a panel and want to add the picture files in pictureboxes inside the panel.
But i don't know how many images there are in the folders, so i have to add dynamically the pictureboxes in the panel (i want one picturebox per picture files)
But i also would like to add event on those picturebox (onclick and DragDrop).
How do i do that ?
Thanks for your help.
Use Controls.Add to add the pictureboxes, then use AddHandler to create the event handlers.
Please post questions to the forums, where others may benefit.
I do not offer free assistance by e-mail. Thank you!
Thanks for the info ! I will try that !
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center