導航:首頁 > 版本升級 > 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操作系統版本相關的資料

熱點內容
電腦可以插著u盤解壓文件嗎 瀏覽:835
qq郵箱發來盜號提醒 瀏覽:821
java的繪圖 瀏覽:982
ifm顯示屏用什麼軟體編程 瀏覽:234
如何用語言編程 瀏覽:112
怎麼設置數據驗證密碼錯誤 瀏覽:529
linuxjavajdk下載 瀏覽:428
手機網路熱點 瀏覽:69
釘釘文件怎麼存在桌面 瀏覽:214
iarformsp430燒寫程序 瀏覽:278
如何開設微信網站 瀏覽:377
火山數據文件路徑 瀏覽:707
原生app嵌入cocos2d 瀏覽:242
珠海文件紙回收多少錢一公斤 瀏覽:318
數據透析區域放什麼 瀏覽:425
u盤gho文件怎麼打開 瀏覽:809
qq皮膚動漫卡通一套 瀏覽:395
word2007ocr 瀏覽:705
魚雷助手刷recovery教程 瀏覽:485
蘋果4s原始id碼是多少 瀏覽:207

友情鏈接