I have got a ListView box consisting 5 columns with the last column storing a path to an image. My desire is to access the image path and send it to the listView1_MouseClick Event Handler. I have tried a few options, but none have produced the desired result due to my limited knowledge around event handlers. Much appreciated if someone could help me with my quest and THANKS in advance!
below are the two procedures:-
public string GetImageDetailsHandler(object sender, EventArgs e){
return(listView1.SelectedItems[0].SubItems[4].ToString());
}
private void listView1_MouseClick(object sender, MouseEventArgs e){
ImageForm image = new ImageForm();
MouseClick += (sender, e) => { GetImageDetailsHandler(sender, e); };
image.pictureBox1.Image = Image.FromFile(GetImageDetailsHandler);
image.ShowDialog();
}