//Takes place whenever a PictureBox is double clicked by the user protected void thumbnail_DoubleClick(object sender, EventArgs e) { //Retrieve the selected PictureBox PictureBox pbSelected = sender as PictureBox; //Retrieve the image index from the Tag attribute int index = Convert.ToInt32(pbSelected.Tag.ToString()); //Get the image URL of the full sized image string fullImageURL = fullImages[index].ToString(); //Create a new instance of the loading progress form, passing the full image URL as input LoadingProgressForm progressForm = new LoadingProgressForm(fullImageURL); //Show the loading progress form progressForm.ShowDialog(); }