判断windows操作系统平台
判断当前Windows系统是win2000,winXP,winVista,win2003,win7...
private static IntPtr GetSysTrayWnd()
{
IntPtr handle = FindWindow("Shell_TrayWnd", null);
handle = FindWindowEx(handle, IntPtr.Zero, "TrayNotifyWnd", null); if (IsWindowsXP || IsWindows2000 || IsWindows2003 || IsWindowsVista || IsWindows7)
{
if (IsWindows2000)
{
handle = FindWindowEx(handle, IntPtr.Zero, "ToolbarWindow32", null);
return handle;
}
else
{
handle = FindWindowEx(handle, IntPtr.Zero, "SysPager", null);
handle = FindWindowEx(handle, IntPtr.Zero, "ToolbarWindow32", null);
return handle;
}
}
else
{
return handle;
}
}
public static bool IsWindows2000
{
get
{
return (Environment.OSVersion.Platform == PlatformID.Win32NT) && (Environment.OSVersion.Version.Major == ) && (Environment.OSVersion.Version.Minor == );
}
} //C#判断操作系统是否为WindowsXP
public static bool IsWindowsXP
{
get
{
return (Environment.OSVersion.Platform == PlatformID.Win32NT) && (Environment.OSVersion.Version.Major == ) && (Environment.OSVersion.Version.Minor == );
}
} //C#判断操作系统是否为Windows2003
public static bool IsWindows2003
{
get
{
return (Environment.OSVersion.Platform == PlatformID.Win32NT) && (Environment.OSVersion.Version.Major == ) && (Environment.OSVersion.Version.Minor == );
}
} //C#判断操作系统是否为WindowsVista
public static bool IsWindowsVista
{
get
{
return (Environment.OSVersion.Platform == PlatformID.Win32NT) && (Environment.OSVersion.Version.Major == ) && (Environment.OSVersion.Version.Minor == );
}
} //C#判断操作系统是否为Windows7
public static bool IsWindows7
{
get
{
return (Environment.OSVersion.Platform == PlatformID.Win32NT) && (Environment.OSVersion.Version.Major == ) && (Environment.OSVersion.Version.Minor == );
}
}
判断windows操作系统平台的更多相关文章
- 判断 Windows操作系统是32位还是64位
function IsWin64: Boolean; var Kernel32Handle: THandle; IsWow64Process: function(Handle: Windows.THa ...
- userAgent,JS这么屌的用户代理,你造吗?——判断浏览器内核、浏览器、浏览器平台、windows操作系统版本、移动设备、游戏系统
1.识别浏览器呈现引擎 为了不在全局作用域中添加多余变量,这里使用单例模式(什么是单例模式?)来封装检测脚本.检测脚本的基本代码如下所示: var client = function() { var ...
- cmake 判断操作系统平台
转载自 cmake 判断操作系统平台 MESSAGE(STATUS "operation system is ${CMAKE_SYSTEM}") IF (CMAKE_SYSTEM_ ...
- 检测访问网页的浏览器呈现引擎、平台、Windows操作系统、移动设备和游戏系统
/** * Author: laixiangran. * Created by laixiangran on 2015/12/02. * 检测访问网页的浏览器呈现引擎.平台.Windows操作系统.移 ...
- CVE-2019-0797漏洞:Windows操作系统中的新零日在攻击中被利用
https://securelist.com/cve-2019-0797-zero-day-vulnerability/89885/ 前言 在2019年2月,卡巴实验室的自动漏洞防护(AEP)系统检测 ...
- JS判断访问设备(userAgent)加载不同页面 JS判断客户端操作系统类型(platform)
//平台.设备和操作系统 var system ={ win : false, mac : false, xll : false }; //检测平台 var p = navigator.platfor ...
- Windows操作系统
Microsoft Windows,是美国微软公司研发的一套操作系统,它问世于1985年,起初仅仅是Microsoft-DOS模拟环境,后续的系统版本由于微软不断的更新升级,不但易用,也慢慢的成为家家 ...
- JS判断是否是微信页面,判断手机操作系统(ios或android)并跳转到不同下载页面
JS判断客户端是否是iOS或者Android 参考:http://caibaojian.com/browser-ios-or-android.html function is_weixin() { v ...
- Windows操作系统消费者价值亮点
在讨论Windows操作系统之前,我们先看看消费者是什么. 消费者是产品和服务的最终使用者 ,其购买商品的目的主要是用于个人或家庭需要. 那么消费者的需求是什么,是使用,所以谁能给消费者更好的使用体验 ...
随机推荐
- python字符串格式化方法 format函数的使用
python从2.6开始支持format,新的更加容易读懂的字符串格式化方法, 从原来的% 模式变成新的可读性更强的 花括号声明{}.用于渲染前的参数引用声明, 花括号里可以用数字代表引用参数的序 ...
- Android开发(二十九)——layout_weight的含义
首先声明只有在Linearlayout中,该属性才有效.之所以android:layout_weight会引起争议,是因为在设置该属性的同时,设置android:layout_width为wrap_c ...
- 在线制作h5
在线制作h5 官网:http://www.godgiftgame.com 在线制作h5首页预览效果图如下: 一.主要功能区域主要功能区域分布在上中左右三个地方,1.上面区域是功能选择区,包括图片素材. ...
- SharedPreference注册OnSharedPreferenceChangeListener一直无法回调问题
注册代码如下: SharedPreferences sp = getSharedPreferences("AndroidDemo", Context.MODE_PRIVATE); ...
- CentOS安装keepalived
Haproxy.Keepalived双主高可用负载均衡 1.安装keepalived yum install keepalived -y
- 关于DDD的 认识
tks: 第一篇: 领域驱动设计系列(1)通过现实例子显示领域驱动设计的威力 第二篇: 领域驱动设计系列(2)浅析VO.DTO.DO.PO的概念.区别和用处 第三篇: 领域驱动设计系列(3)有选择性的 ...
- UDP网络通信OSC 协议
使用方法 ofxOscMessage mesg; mesg.setAddress("m"); mesg.addIntArg(); mesg.addIntArg(); mesg.ad ...
- lucene.net的一个动态更新类
工作的需要,需要对于lucene.net索引即时的更新,毕竟lucene.net的索引重建的话比较慢,数据量大的时候建下要几天,所以就写个了缓冲类来解决即时的更新的问题,其实还是比较简单的. 大体上的 ...
- ruby -- 基础学习(一)项目文件夹说明
App文件夹子文件夾功能介绍 (1)controllers 存放驱动业务逻辑的控制器 (2)helpers 存放视图辅助类,一些常用的代码段 (3)mailers Rails ...
- ruby -- 问题解决(七)ActionController::InvalidAuthenticityToken解决办法
学习链接:http://cnkerry.iteye.com/blog/350718 解决方法一: class FooController < ApplicationController prot ...