Last active
December 9, 2020 10:02
-
-
Save bjoerntx/4e05bf4eea74ec71ccce87debba91249 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void textControl1_KeyDown(object sender, KeyEventArgs e) { | |
//increase zoom by ten percent when pressing CTRL + Plus | |
int currZoom = textControl1.ZoomFactor; | |
if (e.Control && (e.KeyCode == Keys.Oemplus)) { | |
textControl1.Zoom(currZoom + 10); | |
} | |
//decrease zoom by ten percent when pressing CTRL + Minus | |
if (e.Control && (e.KeyCode == Keys.OemMinus)) { | |
textControl1.Zoom(Math.Max(10, currZoom - 10)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment