C# keypress 이벤트 실행여부 확인 코드

sso·2024년 3월 7일
0

C#

목록 보기
7/8
private List<string> _lstTmp = new List<string>();
        private void tEdit_subdivision_time_weight_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar == '\r')
            {
                string tmp = string.Empty;
                for (int ii = 0; ii < _lstTmp.Count; ii++)
                {
                    tmp += _lstTmp[ii].ToString();
                }
                System.Windows.Forms.MessageBox.Show(tmp);
                _lstTmp.Clear();
            }
            else
            {
                _lstTmp.Add(e.KeyChar.ToString());
            }
        }
profile
오늘도 하나씩 해결해 나가자!

0개의 댓글