if TOSVersion.Major = 10 then  // 高版本的Delphi(比如Berlin)可以这样写

ShowMessage('Windows 10');

或者:

if Win32MajorVersion = 10 then

WIN10以后如果Manifest中不写支持WIN10的话,获取版本号的API获取的是6,最新版的Delphi的manifest中写了支持WIN10,所以没问题。
老版本Delphi要自己写manifest中间加上
    <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
        <application>
          <!-- Windows 10 --> 
          <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
          <!-- Windows 8.1 -->
          <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
          <!-- Windows Vista -->
          <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/> 
          <!-- Windows 7 -->
          <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
          <!-- Windows 8 -->
          <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>    
    
          <!--This Id value indicates the application supports Windows Vista/Server 2008 functionality -->
          <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />
          <!--This Id value indicates the application supports Windows 7/Server 2008 R2 functionality-->
          <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />
          <!--This Id value indicates the application supports Windows 8/Server 2012 functionality-->
          <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />
          <!-- This Id value indicates the application supports Windows Blue/Server 2012 R2 functionality-->
          <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />
          <!-- This Id value indicates the application supports Windows Threshold functionality-->
          <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
        </application>
    </compatibility>

http://bbs.2ccc.com/topic.asp?topicid=529101

WIN10以后如果Manifest中不写支持WIN10的话,获取版本号的API获取的是6的更多相关文章

  1. wamp支持win10吗?怎么设置?

    上周ytkah总算把系统升级到win10了,可怎么设置wamp支持win10呢?启动wampwerver是处于黄色状态,打开本地页面是空白,应该是端口问题. 单击右下角wamp图标,点Apache,修 ...

  2. 分享一个CQRS/ES架构中基于写文件的EventStore的设计思路

    最近打算用C#实现一个基于文件的EventStore. 什么是EventStore 关于什么是EventStore,如果还不清楚的朋友可以去了解下CQRS/Event Sourcing这种架构,我博客 ...

  3. Photoshop/PS中如何写维吾尔语等语言 乱码

    在新疆的朋友都了解很多标语上面都会有汉语.维语等两种语言.有很多维吾尔语.哈萨克语.柯尔克孜语等语言 要在PS 里进行设计处理,这时在Photoshop中进行设计时文字粘贴进来后出现不正常是乱码形式. ...

  4. (win10 64位系统中)Visual Studio 2015+OpenCV 3.3.0环境搭建,100%成功

    (win10 64位系统中)Visual Studio 2015+OpenCV 3.3.0环境搭建,100%成功 1.下载opencv 官网http://opencv.org/下载windows版Op ...

  5. Kon-boot v2.5介绍与使用方法总结(支持win10)

    Kon-boot这个工具相信大家都不陌生,这是一款专门针对Windows.Linux.MAC登陆密码破解工具,他能绕过系统所设有的登陆密码,让你的登陆畅通无阻.KON-Boot的原理是在于处理BIOS ...

  6. [Spring学习笔记 7 ] Spring中的数据库支持 RowMapper,JdbcDaoSupport 和 事务处理Transaction

    1.Spring中的数据库支持 把具有相同功能的代码模板抽取到一个工具类中.2.关于jdbc template的应用 jdbcTemplate模板操作类,把访问jdbc的模板抽取到template中, ...

  7. u-boot中添加mtdparts支持以及Linux的分区设置

    简介 作者:彭东林 邮箱:pengdonglin137@163.com u-boot版本:u-boot-2015.04 Linux版本:Linux-3.14 硬件平台:tq2440, 内存:64M   ...

  8. Java jre7及以上版本中的switch支持String的实现细节

    Java7中的switch支持String的实现细节 作者: zsxwing 更新: 2013-03-04 21:08:02 发布: 2012-04-26 13:58:19 在Java7之前,swit ...

  9. cnbolgs博客中添加Latex支持

    参考:http://www.cnblogs.com/ilogic/archive/2012/08/05/latex.html 主要是利用在线生成公式的工具:MathJax,但要在博客上获得 MathJ ...

随机推荐

  1. AppStoreID--安装URL--应用更新URL--应用评分URL

    #define AppStoreID @"987353224" //应用安装URL #define AppStoreInstallURLFormat @"https:// ...

  2. java基本数据类型练习

    package javafirst;//包名 public class JavaFirstDay { //基本数据类型的练习 public static void main(String[] args ...

  3. 《Windows核心编程》之“完成端口”(对所有IO都是如此,不仅仅是对socket)

    <Windows核心编程>第10章开头部分一再强调:“IO Completion Port”是“构建高性能.可升缩的应用程序”的最佳设施之一,它不仅适用于处理设备IO,也适用于其它越来越多 ...

  4. 【32.89%】【codeforces 574D】Bear and Blocks

    time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard ou ...

  5. hadoop 3.x 回收站

    使用回收站最主要是为了给误删文件的你留条后路 打开core-site.xml添加以下配置 <!--回收站保存文件时间--> <property> <name>fs. ...

  6. AbsoluteLayout绝对布局

    1.四大控制属性(单位都是dp): ①控制大小: android:layout_width:组件宽度 android:layout_height:组件高度 ②控制位置: android:layout_ ...

  7. C# opcode 查询源码

    Add|将两个值相加并将结果推送到计算堆栈上.Add.Ovf|将两个整数相加,执行溢出检查,并且将结果推送到计算堆栈上.Add.Ovf.Un|将两个无符号整数值相加,执行溢出检查,并且将结果推送到计算 ...

  8. 【JDBC】java PreparedStatement操作oracle数据库

    ************************************************************************ ****原文:blog.csdn.net/clark_ ...

  9. Method for finding shortest path to destination in traffic network using Dijkstra algorithm or Floyd-warshall algorithm

    A method is presented for finding a shortest path from a starting place to a destination place in a ...

  10. R 语言的学习(一)

    1. 基本 "hello world!" > "hello world!" [1] "hello world!" 这在 R 中并不是一 ...