导航:首页 > 版本升级 > delphi操作系统版本

delphi操作系统版本

发布时间:2024-04-02 15:20:11

1. 在Delphi中如何获得操作系统版本

unitUnit1;

interface

uses
Windows,Messages,SysUtils,Variants,Classes,Graphics,Controls,Forms,
Dialogs,StdCtrls;

type
TForm1=class(TForm)
Button1:TButton;
Memo1:TMemo;
procereButton1Click(Sender:TObject);
private
{Privatedeclarations}
public
{Publicdeclarations}
end;

var
Form1:TForm1;

implementation

usesfmxutils;

{$R*.dfm}

procereTForm1.Button1Click(Sender:TObject);
begin
executefile('cmd','/cver>osver.txt','',0);
memo1.Lines.LoadFromFile('osver.txt');
end;

end.

2. DELPHI哪个版本最好用

D7有什么好用的?!
用D2010最方便,以前很多需要第三方控件完成的功能,现在用自带控件就能版完成了。
如果权你经常使用泛型,暂时不要用D2010,D2010的泛型实现有严重Bug。
你可以使用D2009。
D2009以后的Delphi都是完全Unicode化的,如果你不想处理和以前的非Unicode程序的兼容问题,你可以使用D2007。
你没钱,还要用正版的话,可以使用Turbo Delphi。
我说的这些版本对新版OS的兼容性都很好。

3. delphi6 判断是否为win7操作系统问题

functionGetWindowsVersion:string;
var
Info:OSVERSIONINFO;
begin
FillChar(Info,sizeof(Info),0);
Info.dwOSVersionInfoSize:=sizeof(OSVERSIONINFO);
GetVersionEx(Info);


end;
//完全没问题,我的是win8,取的版本号是6.2.9200

4. delphiXE如何判断操作系统是win7还是winXP

delphiXE如何判断操作系统是win7还是winXP?

delphi7的代码在XE上无效,没有那些函数,有哪位大大知道如何准确判断吗?不知道xe有没有这方面的函数

Msdn查一下GetVersionEx这个函数,
看下Getting the System Version 这个例子
我在偶的Vs2010的msdn里搜索到的
D7上的可以话, 可以写在DLL, 然后调用通过返回值来判断.

XE比d7不是强一点半点,难道没有直接获取系统版本的函数?或更方便的方法?

以下代码 XE + XP下正确, WIN 7没有条件测试

Delphi/Pascal code?

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45

function GetWindowsVersionString: AnsiString;
var
ver: _OSVERSIONINFOA;
begin
if GetVersionExA(ver) then
with ver do
Result := Trim(
Format(
'%d.%d build %d %s',
[dwMajorVersion, dwMinorVersion, dwBuildNumber, szCSDVersion]))
else
Result := '';
end;

function GetWindowsVersion: String; // 读取操作系统版本
var
AWin32Version: Extended;
os: string;
begin
os := 'Windows ';
AWin32Version := StrtoFloat(Format('%d.%d', [Win32MajorVersion, Win32MinorVersion]));
if Win32Platform = VER_PLATFORM_WIN32S then
Result := os + '32'
else if Win32Platform = VER_PLATFORM_WIN32_WINDOWS then
begin
if AWin32Version = 4.0 then Result := os + '95'
else if AWin32Version = 4.1 then Result := os + '98'
else if AWin32Version = 4.9 then Result := os + 'Me'
else Result := os + '9x'
end
else if Win32Platform = VER_PLATFORM_WIN32_NT then
begin
if AWin32Version = 3.51 then Result := os + 'NT 3.51'
else if AWin32Version = 4.0 then Result := os + 'NT 4.0'
else if AWin32Version = 5.0 then Result := os + '2000'
else if AWin32Version = 5.1 then Result := os + 'XP'
else if AWin32Version = 5.2 then Result := os + '2003'
else if AWin32Version = 6.0 then Result := os + 'Vista'
else if AWin32Version = 6.1 then Result := os + '7'
else Result := os;
end
else Result := os + '??';

Result := Result + ' ' + GetWindowsVersionString;
end;

阅读全文

与delphi操作系统版本相关的资料

热点内容
日本瑜伽电影 浏览:463
有一部电影讲一个男的做鸭 浏览:247
看视频的网址推荐 懂的 浏览:411
南昌大数据培训 浏览:603
每天自动1的代码 浏览:375
因为存在系统错误代码193 浏览:56
ip网络适配器是什么 浏览:61
印尼爱情电影 浏览:794
求一个网站带小说的那种 浏览:56
pdf文件如何不能复制 浏览:612
都市连妈妈都收的小说 浏览:300
java第一步pdf 浏览:984
javahourofday 浏览:158
免费资源在线观看2021 浏览:253
linuxssh命令传文件 浏览:521
男漏点电影 浏览:46
哪里可以充qq红包 浏览:868
久久影视网 浏览:458
港股机构业绩预测数据哪里查 浏览:768
有什么app可以督促睡觉 浏览:835

友情链接