private void photoPictureBox_Click(object sender, EventArgs e) { PhotoPictureBox photo = sender as PhotoPictureBox; FormPhotoInfo photoInfo = new FormPhotoInfo(photo); photoInfo.ShowDialog(); }
protected override void OnClick(EventArgs e) { base.OnClick(e); FormPhotoInfo photoInfo = new FormPhotoInfo(Photo); photoInfo.ShowDialog(); }