我需要取得控制面板中区域设置中的日期分隔符。发现它们在注册表中的如下键值中。HKEY_CURRENT_USER\Control Panel\International\sDate 或
HKEY_USERS\.DEFAULT\Control Panel\International\sDate如何在Delphi中取得这个键值呢?
请给出具体的代码。
HKEY_USERS\.DEFAULT\Control Panel\International\sDate如何在Delphi中取得这个键值呢?
请给出具体的代码。
解决方案 »
- GetWindowTextA 如何用
- 在数据库服务器死机的情况下,如何保证工作站查询的情况下不死机?
- 关于';'expected but'.'found的错误
- 关于dephi连oracle数据库
- adoquery模糊查询的问题?
- 中国delphi程序员知多少?
- 各位高手 谁能告诉我 如何判断电脑装了什么浏览器?
- 一DCU的函数接口, 写数据的参数是Pansichar的, 怎么把一个Integer值写进去
- Database控件越多,是否速度越快呢?
- ????????
- 请教高手一个问题。超级解霸3000和金山解霸2003中有一个桌面播放在DELPHI中要如何实现?
- 请问获得分辨率的函数是什麽?来者有分。等……
2. 如果还是有问题,是不是你要查找的是Acrobat Reader,
if reg.OpenKey('SOFTWARE\Adobe\Acrobat Reader\5.0\InstallPath' ,false) then
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ var
str: string;
Reg: TRegistry;
begin
Reg := TRegistry.Create;
Reg.RootKey := HKEY_LOCAL_MACHINE;
if reg.OpenKey('SOFTWARE\Adobe\Adobe Acrobat\5.0\InstallPath' ,false) then
str := reg.ReadString('');
edit1.text := str;
Reg.Free;
end. 先引用
直接读写DateSeparator就是了。
MyReg:TRegistry;
StrReadValue :string;
begin Myreg.RootKey:=HKEY_CURRENT_USER;
StrReadValue:='';
if Myreg.OpenKey('Control Panel\International',false) then
begin
StrReadValue:=Myreg.ReadString('sDate');
end;
Finally
Myreg.Free;
end;
if Reg.OpenKey('\Software\Microsoft\Windows\CurrentVersion', True) then
begin
RegStr:=reg.ReadString('zcm');
var
regemp:tregistry;
begin
regemp:=TRegistry.Create ;
With regemp do ///从注册表中读取用户信息
begin
RootKey :=HKEY_LOCAL_MACHINE ;
if OpenKey('HKEY_CURRENT_USER\Control Panel\International\sDate ',true) then
begin
if ValueExists ('gc_vale') then
begin
ShowMessage ('此用户还没有注册');
exit;
end
else
begin
a:=ReadString('');
b:=ReadString('');
c:=ReadString('');
d:=ReadString('');
end;
end;
end;
regemp.Free ;
end;
但是千万别忘了在use 单元引用 registry
否则要出错