I want to make a zoom panel on the clamped combination ... How to track the key combination Ctrl + MouseWheel? I do not understand how to simultaneously work with the event of rotating the mouse wheel and pressing Ctrl. Here is what is at the moment:
private void MainForm_KeyPress(object sender, KeyPressEventArgs e) { if (ModifierKeys.HasFlag(Keys.Control) & колесо мыши активно) { //####работает для MouseWheel#### //if (e.Delta > 0) //zoom + //{ // canvas.Width += e.Delta / 5; // canvas.Height += e.Delta / 5; // canvas.Location = new Point(canvas.Location.X - e.Delta / 10, canvas.Location.Y - e.Delta / 10); //} //else if (e.Delta < 0) //zoom - //{ // canvas.Width += e.Delta / 5; // canvas.Height += e.Delta / 5; // canvas.Location = new Point(canvas.Location.X - e.Delta / 10, canvas.Location.Y - e.Delta / 10); //} } } thank