procedure TfrmCB.F1Book1KeyPress(Sender: TObject; var Key: Char);
begin
if not (Key in ['0'..'9','.',#8]) then
Key:=#0;
end;
当输入"3DF"时,拦不下"DF"这两个字母
begin
if not (Key in ['0'..'9','.',#8]) then
Key:=#0;
end;
当输入"3DF"时,拦不下"DF"这两个字母
解决方案 »
- 关于邮件服务器实现的原理
- 用VPN对局域网有何影响?
- 怎么上取整小数
- 200大元新贴找工作:
- 一个关于DBGRID的问题?
- 大家帮忙啊,ado的问题。
- 在delphi理使用vb控件的调用问题
- 关于数据长度的问题
- 关于Wb Services的安全问题:怎样做到只有授权用户可以访问?
- Delphi 2007在win7任务栏出现两个状态,但是进程里只有一个bds.exe
- 請幫手chart控件中如何實現動態的給每一個柱行圖的底上與頭部標上不同的文字?
- 我将一个form的formstyle改为fsMDIChild,然后再改回fsNormal后,发现这个form仍然是一application.creatform(Tform1,form1)时这个form就
procedure TForm1.F1Book61EndEdit(Sender: TObject;
var EditString: WideString; var Cancel: Smallint);
begin
try
strtofloat(EditString)
except
showmessage('不是一个有效的数值');
cancel:=1;
end;
end;
CellFmt: F1CellFormat;
begin
CellFmt :=Formulabook1.CreateNewCellFormat;
Cellfmt.NumberFormat[1]:='#,###.##;(#,###.##);0;"Error: Entry mustbe numeric"';//'#,###';
F1book1.SetCellFormat(CellFmt);