当前位置:主页>销售管理软件> 列表

如何判断当前操作系统是简体还是英文或者繁体呢? 找商品进销存表格

销售管理软件版1楼: 有一个软件,想让它在运行的电脑上自动判断当前操作系统,但我要
如何判断当前操作系统是简体还是英文或者繁体呢?

2楼: procedure TForm1.Button1Click(Sender: TObject);
var
S : array[0..255] of char;
iType : LCTYPE;
begin
iType := LOCALE_SNATIVELANGNAME;
GetLocaleInfo(LOCALE_SYSTEM_DEFAULT, iType, S, SizeOf(S));
if s=''中文(简体)'' then
showmessage(''简体'')
else
showmessage(''繁体'');
end; 如商品进销存表格

3楼: 再给一种方法.

var
DefaultID:integer;
begin
DefaultID:=GetSystemDefaultLangID;
if (DefaultID = 1028) then
begin
繁体中文
end
else if (DefaultID = 2052) then
begin
简体中文
end
else
begin
其它语言
end;

4楼: 不对吧?应该用GetACP对。即使GetSystemDefaultLangID是简体中文,但用户也可能将当前代码页设置为繁体中文。

5楼: 有用,但不知楼上的用GETACP是怎么回事呢.

6楼: 用GETACP是怎么回事呢.

销售管理软件版7楼: The GetACP function retrieves the current ANSI code-page identifier for the system.

UINT GetACP(VOID);
Parameters
This function has no parameters.

Return Values
The return value is the current ANSI code-page identifier for the system, or a default identifier if no code page is current.

Remarks
Windows 2000/XP: The return value for the Indic languages is 0, because they are Unicode only.

Requirements
Windows NT/2000/XP: Included in Windows NT 3.1 and later.
Windows 95/98/Me: Included in Windows 95 and later.
Header: Declared in Winnls.h; include Windows.h.
Library: Use Kernel32.lib.

GetACP 也就是獲取系統內置的代碼頁,系統的默認語系可以換成別的語系(控制面版中的區域選項),但是系統的默認代碼頁目前還是不能在可視化界面更改的(至少我不知道,誰知道告訴我)。

8楼: 多人接受答案了。