private void DisplaySchedule(object sender, EventArgs e) { PDFViewer.BringToFront(); btnClose.BringToFront(); PDFViewer.Visible = true; btnClose.Visible = true; if (sender is Button) { var button = (Button)sender; CLOC = button.Parent.Parent.Name.ToString(); } Control[] controls = this.Controls.Find(CLOC, true); if (controls.Length == 1) // 0 means not found, more - there are several controls with the same name { Item control = controls[0] as Item; if (control != null) { } MessageBox.Show(control.FullPath); PDFViewer.Navigate(control.FullPath + @"\4-Plans\Listings\1.pdf"); btnClose.BringToFront(); } }