반응형
private void txtControl_KeyPress(object sender, KeyPressEventArgs e)
{
if(!(char.IsDigit(e.KeyChar) || e.KeyChar == Convert.ToChar(Keys.Back)))
{
e.Handled = true;
}
}
반응형
'[====== Development ======] > C#' 카테고리의 다른 글
파일 복사시 Unique 이름으로 저장 (0) | 2021.08.06 |
---|---|
C# -> C++ MFC SendMessage string (0) | 2021.08.05 |
전체 윈도우를 최소화하는 코드 (0) | 2021.08.04 |
파일 아이콘, 확장자 연결 프로그램 등록 (0) | 2021.07.22 |
[WPF] Application Hosting (0) | 2021.06.14 |