public Label Createlabel()
{
Label intervillabel = new Label();
intervillabel.Text = numericUpDown1.Value.ToString();
intervillabel.Location = new Point(BeatDetector.Location.X, 0);
intervillabel.AutoSize = true;
intervillabel.Visible = true;
return intervillabel;
}
private void Form1_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.ControlKey)
{
panel1.Controls.Add(Createlabel())
}
}