private void textBoxHotKey_EnterFocus(object sender, EventArgs e) { //enter_focus txtHotKey.ForeColor = DefaultForeColor; //hkServer = new HotKey(); //altrimenti problemi con null pointer hkRecorder.KeyRecorded += (object sender1, HotKeyRecordedArgs e1) => { txtHotKey.Text = e1.hotKey.ToString(); hkServer = e1.hotKey; }; hkRecorder.Rec(); }
private void button1_Click(object sender, EventArgs e) { hkRecorder.Rec(); }