(Sorry if this is easy or impossible. I'm still reasonably new to C# and can't find this anywhere.)
I have created a program containing something similiar to:
PictureBox[] Images = new PictureBox[Total];
Images[0] = new PictureBox();
Images[0].Click += new EventHandler(Clicked_Click);
The thing is that allImages created this wayuse the same EventHandler, as I can't give them all seperate ones because the value of thevariable Total might change at some point. I want all Images to use the same EventHandler, but I only want the Image clicked upon to be affected when the click happens.
So my question is: Is there a way to tell WHICH image was clicked on, or is there a better way to do this?
The value of sender is "System.Windows.Forms.PictureBox, SizeMode: StretchImage" and e returns "System.Windows.Forms.MouseEventArgs", within the EventHandler.
Thanks.