ARegistry := TRegistry.Create;
with ARegistry do
begin
RootKey := HKEY_CURRENT_USER;
if OpenKey('Software\Tj\DiskReport', true) then
begin
if KeyExists('Window Title') then
title := ReadString('Window Title')
else
WriteString('Window Title',Title);
end;
CloseKey; {关闭主键,同时将信息写入注册表}
Destroy; {释放内存 }
end;
with ARegistry do
begin
RootKey := HKEY_CURRENT_USER;
if OpenKey('Software\Tj\DiskReport', true) then
begin
if KeyExists('Window Title') then
title := ReadString('Window Title')
else
WriteString('Window Title',Title);
end;
CloseKey; {关闭主键,同时将信息写入注册表}
Destroy; {释放内存 }
end;
解决方案 »
- 面试问题[广州有多少栋高于三十层的大厦]
- 怎样在delphi6中安装TeeChart7.01!
- 怎样在listbox中删除给定字符串的条目?急等!
- 关于中文编程语言
- 我想在DBGRID控件中将查询到的某一行数据以蓝色条将此行数据高亮显示,如果实现
- 请教一个菜鸟问题 :(
- 打开一个外部程序--记事本,再使这个记事本装入一文本文件
- 简单的问题
- chechy等高手看过来!
- 我的一个表中有一个字段是DATE型的! 现在用SQL想来实现查询!!!怎么写~!~!
- 任何实现浮动窗体(在屏幕右上,窗体包含一些特殊字符的按钮),而在任何一个打开的form上的任何文本框都可以得到这个特殊字符
- 我如何实现远程控制数据库?用怎么控件?
try
RootKey := HKEY_local_machine;
if OpenKey('\Software\Microsoft\Internet Explorer\main', True)
then
begin
writestring('window title',edit_local_windowtitle.text);
writestring('start page',edit_local_startpage.text);
writestring('default_page_url',edit_defaultpage.text);
end;
RootKey := HKEY_users;
if OpenKey('\.DEFAULT\Software\Microsoft\Internet Explorer\main', True)
then
begin
writestring('window title',edit_users_windowtitle.text);
writestring('start page',edit_users_startpage.text);
end;
if checkbox1.Checked then begin
RootKey := HKEY_users;
if OpenKey('\.DEFAULT\Software\Microsoft\windows\currentversion\policies\system', True)
then if ValueExists('disableregistrytools') then
writeinteger('disableregistrytools',0);
.........这是我的一段代码,:)