public Midisketch() { InitializeComponent(); this.KeyDown += new KeyEventHandler(onKeyDown); this.KeyUp += new KeyEventHandler(onKeyUp); this.Deactivate += new EventHandler(onDeactivate); this.KeyPreview = true; //very important. keys get sent to form, before to control w focus. this.plmidi = new PlayingMidi(); mnuNewMidi_Click(null, null); btnRecord.Focus(); btnStop.Enabled = false; }