private void btnTop_Click(object sender, EventArgs e) { //This is messy if (listBox1.SelectedIndex != -1) { MovieResult Title; string selected = listBox1.SelectedItem.ToString(); int senderID; Title = API.SearchMovie(selected, 1).results[0]; senderID = Title.id; frmInformation dataForm = new frmInformation(senderID); dataForm.Show(); this.Hide(); } }