private void toolStripMenuItem1_Click(object sender, EventArgs e) { ToolStripMenuItem menuItem = sender as ToolStripMenuItem; if (menuItem != null) { ContextMenuStrip photoMenu = menuItem.Owner as ContextMenuStrip; if (photoMenu != null) { Control controlSelected = photoMenu.SourceControl; if (controlSelected is PhotoIcon) { frmPhotoEdit al = new frmPhotoEdit((PhotoIcon)controlSelected, this); al.Show(); } } } }