C#

KeyDown 이벤트가 발생하지 않을때

안녕1999 2020. 10. 24. 23:39
Form속성에서 KeyPreview=True


		private void Form1_KeyDown(object sender, KeyEventArgs e)//KeyPreview=True
		{
			switch (e.KeyCode)
			{
				case Keys.F2:
					...
					e.Handled = true;
					break;
				case Keys.F3:
					...
					break;
				case Keys.F4:
					...
					break;
				default:
					break;
			}
		}