易截截图软件、单文件、免安装、纯绿色、仅160KB

在delphi中判断字符串是否数字,以及精度处理函数

// 判断是否是数值型   By yangxiao  2007.7.21
function isNumeric(strText: WideString): Boolean;
var
  s: string;
  i, l, p: Integer;
begin
  Result := False;
  l := Length(strText);
  if l = 0 then Exit;
  s := '';
  for i:=1 to l do
  begin
    case strText[i] of
      '0'..'9':
        s := s + strText[i];
      'E', 'e', '+', '-', '.':
      begin
        p := PosEx(strText[i], strText, i+1);
        if p = 0 then
        begin
          case strText[i] of
            'E', 'e':
              if (i=1) or (i=l) then Exit;
            '+', '-':
              if i > 1 then
                case strText[i-1] of
                  'E', 'e':
                    s := s + strText[i];
                else
                  Exit;
                end;
          end;
        end
        else


相关文档:

Delphi日期函数

所在单元: DateUtils
Day 开头的函数
1、DayOf()
描述: 使用 DateOf 函数用来把一个 TDateTime 类型的变量转变成一个 只带有日期的 TDateTime 类型变量。 例如: showmessage(DateTimetostr(dateof(now()))); 你得到的是 2003/03/19 而 showmessage(DateTimetostr((now()))); 得到的是
2、DateTimeTostr()
描述: Da ......

DELPHI用户登录方案

3.2  用户登录方案
在进入一个系统时,必须先在登录窗体中输入正确的用户名和密码才能进入。这样可以确保系统的安全性和保密性,登录窗体的制作按照系统的大小及用处,可以分为不同的登录窗体样式,在系统第一次登录前,首先要对操作员信息进行相应的设置。本节将对登录窗体及操作员管理窗体的制作过程进行详细的说明 ......

Delphi操作注册表的一般步骤

Delphi操作注册表步骤如下:
-------------------------------------
1)在Uses中添加Registry单元;
2)声明TRegistry对象;
3)创建TRegistry对象;
4)指定根键;
----------------try------------------
5)打开需要操作的主键;
6)读写操作;
7)保存并关闭主键;
--------------finally----------------
......

Delphi中文件拷贝方法集合

一、使用文件流的方法进行拷贝,当然。同样的道理,你也可以使用内存流等方法进行文件的拷贝,原理是一样的。
procedure copyfile(sourcefilename,targetfilename : String);
var f1, f2: tfilestream;
begin
 f1 := tfilestream.Create(sourcefilename, fmopenread);
 try
   f2 := tfilestream ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号