public App() { InitializeComponent(); bool ctrldown = false; _keyboardHook = new Y2KeyboardHook(); _keyboardHook.Install(); _keyboardHook.KeyDown += (sender, e) => { if (e.KeyCode == Keys.LControlKey)/// { ctrldown = true; } if (e.KeyCode == Keys.T && ctrldown)// { TakeNote takenote = new TakeNote(); takenote.Show(); } }; _keyboardHook.KeyUp += (sender, e) => { if (e.KeyCode == Keys.LControlKey) { ctrldown = false; } }; }
private void App_KeyDown1(object sender, KeyEventArgs e) { TakeNote takenote = new TakeNote(); takenote.Show(); }
private void button2_MouseClick(object sender, MouseEventArgs e) { TakeNote Tk = new TakeNote(); Tk.Show(); }