选择显示字体大小

如何判断当前操作系统是否为98/2000/xp

方法1.

environment env
integer resp
string temp,ls_version
resp = getenvironment(env)


choose case env.ostype
case aix!
temp = 'aix'
case hpux!
temp = 'hpux'
case macintosh!
temp = 'macintosh'
case osf1!
temp = 'osf1'
case sol2!
temp = 'solaris 2'
case windows!
temp = 'windows'
case windowsnt!
temp = 'windows nt'
end choose
ls_version = temp + ' '+string(env.osmajorrevision)+'.'+string(env.osminorrevision)+'.'+string(env.osfixesrevision)

messagebox("windows version",ls_version)



  每种操作系统都有其版本号,自己在不同的操作系统上运行一下就知道了.然后再转换成自己熟悉的windows名称就可以了

方法2.

long l1
dec{2} ldc_winver
string ls_winver
l1 = getversion()
ldc_winver = mod(intlow(l1),256) + int(intlow(l1)/256)/100
choose case ldc_winver
case 3.10
ls_winver = "windows 3.x"
case 4
ls_winver = "windows nt 4.0"
case 4.10
ls_winver = "windows 98"
case 5
ls_winver = "windows 2000"
case 5.01
ls_winver = "windows xp"
case 5.02
ls_winver = "windows 2003"
end choose
messagebox("windows version",ls_winver)


---------------------------------------------------------------

下面给出一个函数


// function: gf_getos()

// description: get current os name

// arguments: value integer

// returns: string
// 95-98 : windows
// 2000- : windowsnt
// else : ""

// author:kilojin date: 2005.02.14

// modify history:
//

environment env
integer rtn
rtn = getenvironment(env)
if rtn <> 1 then return ""
choose case env.ostype
case windows!
// windows 95 or 98 code
return "windows"
case windowsnt!
// windows nt-specific code
return "windowsnt"
case sol2!
if env.osminorrevision = 5 then
return ""
elseif env.osminorrevision = 6 then
// solaris 2.6 code
return ""
end if
case else
return ""
end choose

  


 


关键字 本文所属关键字

相关 与本文相关文章

分类 所有文章关键字导航

源码编程相关

Java   Asp   PHP   .Net   XML   C/C++   CGI   VB   Jsp   J2ee   J2se   J2me   EJB   Servlet   Tomcat   Resin   Struts   Weblogic   Eclipse   ANT   GUI   JMS   Web servise   IDEA   Webphere   Hibernate   Spring   Jboss   Applet   Swing   Socket   Javamail   Perl   Ajax   P2P   安全   模式   框架   测试   开源   游戏

SQL数据库相关

My-SQL   Ms-SQL   Access   DB2   Oracle   Sybase   SQLserver   索引   存储过程   加密   数据库   分页   视图  

手机无线相关

3G   Wap   CDMA   GRPS   GSM   IVR   彩信   短信   无线   增值业务

网页设计制作相关

HTML   CSS   网页配色   网页特效   Javascript   VBscript   Dreamweaver   Frontpage   JS   Web   网站设计

网站建设推广相关

建站经验   网站优化   网站排名   推广   Alexa

操作系统/服务器相关

Windows XP   Windows 2000   Windows 2003   Windows Me   Windows 9.x   Linux   UNIX   注册表   操作系统   服务器   应用服务器

图形图像多媒体相关

Photoshop   Fireworks   Flash   Coreldraw   Illustrator   Freehand   Photoimpact   多媒体   图形图像

标准 网站致力的规范

Valid CSS!

无不良内容,无不良广告,无恶意代码

Valid XHTML 1.0 Transitional

creativecommons