[Delphi] edit에 숫자만 입력하기

procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char);
begin
	if Key in ['0'..'9', #25, #08, #13] then
	else
	begin
		Key := #0;
		ShowMessage('숫자만 입력하세요');
	end;
end;

댓글

이 블로그의 인기 게시물

[NSIS] 32비트와 64비트 모듈 등록하는 법. (regsvr32)

[Visual Studio] Windows 7 에서 Visual Studio 6.0 디버그 시 프로세스 좀비되는 증상 해결 방법