编制写一个IP的输入框,像windows中设置本地地址那种?0.0.0.0
解决方案 »
- TcxTreeList可否实现复制粘贴的功能?
- 销售表中选择同样的的产品出库时能退出(有图)
- 把上传indy idftp.put()放到线程中 我写的总报内存错误?急
- 请问哪位高手知道怎么将word、Excel文件转换成tif文件来发传真阿?
- 我写了一个函数,在编译时老是提醒有问题,高手帮忙看一下
- 请教,怎么用DELPHI写录音程序??
- ★★★-[ 如何替换 其他应用程序(exe文件) 的图标(要编程实现) ]-★★★
- 拜托拜托,大家帮帮忙!提供一个解决方案!
- Delphi的高手请进?????
- Delphi中如何调用AutoCAD2010完成DWG文件的读取?
- 请教一个DLL的问题
- 100求数据库连接问题的解答:
function TCSForm.IsLegalIP(IP:string):boolean;
var
i, j, l: integer;
ips: array [1..4] of string;
begin
i:=1;
for l:=1 to 4 do ips[l]:='';
for j:=1 to length(ip) do
if ip[j]<>'.' then
begin
if (ip[j]<'0')or(ip[j]>'9') then
begin
//showmessage(ip[j]);
Result:=false;
exit;
end;
ips[i]:=ips[i]+ip[j]
end
else inc(i);
if (i<>4)
or((strtoint(ips[1])>255)or(strtoint(ips[1])<0)) //originally is <1
or((strtoint(ips[2])>255)or(strtoint(ips[2])<0))
or((strtoint(ips[3])>255)or(strtoint(ips[3])<0))
or((strtoint(ips[4])>255)or(strtoint(ips[4])<0)) then
Result:= false
else
Result:= true;
end;
下载来用了:)