为什么Form上添加了其他控件,FormKeyPress就失效了?
if ((Key < '0 ') || (Key > '9 ') && (Key != 8))
{
Key = 0;
ShowMessage( "Please input a number ");
}
我里面只有这一行代码,空白form时可以,加入了几个按钮和Panel控件,改函数就无效了?
[解决办法]
KeyPreview = true;
[解决办法]
KeyPreview = true;