导航:首页 > 版本升级 > 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操作系统版本相关的资料

热点内容
cad的打印到文件怎么设置 浏览:902
智行app铂金会员怎么还有期限 浏览:581
win10用子文件夹改名 浏览:234
ae钢笔工具在哪里 浏览:460
gn105数据线插哪里 浏览:916
破锁屏密码方法 浏览:835
股票数据放哪里 浏览:576
m格式库文件 浏览:279
天际通数据服务怎么开票 浏览:430
写小说发哪个网站比较好 浏览:244
小米电视3蓝牙文件路径 浏览:111
shell读取文件值 浏览:909
文件夹路径栏消失 浏览:795
律师哪些业务不能代替大数据 浏览:952
lol哪些文件可以删除 浏览:701
汇编程序中del是什么意思 浏览:183
幼儿园免费网站模板下载 浏览:210
w619线刷教程 浏览:759
怎么培养编程思想 浏览:697
手机捆绑app的软件怎么卸载 浏览:32

友情链接