procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char); begin if not (key in [ '.',#8]) then key:=#0; //只能输入小数点end; procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char); begin if not (key in [ ' 0'..'9',#8]) then key:=#0; //只能输入数字en
EDIT Ini写Ini配置 uses IniFiles; {$R *.dfm} function IniFileName:string; begin Result:=ExtractFilePath(Application.ExeName)+'Settings.ini'; end; procedure SaveConfig(Edit:TEdit); begin with TIniFile.Create(IniFileName) do begin try