unit reg;interfaceuses
Windows, Messages,registry, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;type
TForm2 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
Form2: TForm2;implementation{$R *.dfm}procedure TForm2.Button1Click(Sender: TObject);
var reg
:tregistry;
d:tdate;
buffer:pchar;
t:ttime;
begin
buffer:='101010';
d:=date;
t:=time;
reg:=Tregistry.Creat;
try
reg.rootkey:=hkey_current_user;
if
reg.openkey('test',true)
then
begin
reg.writecurrency('currency',100);
reg.writebinarydata('binarydata',buffer,10);end;
finally
reg.closekey;
reg.free;
end;end;end.
此程序主要是往注册表里写入内容,hkey_current_user\text\下写入两个键值项
编译的 时候怎么硕没有声明tregistry.creat哪?
Windows, Messages,registry, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;type
TForm2 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
Form2: TForm2;implementation{$R *.dfm}procedure TForm2.Button1Click(Sender: TObject);
var reg
:tregistry;
d:tdate;
buffer:pchar;
t:ttime;
begin
buffer:='101010';
d:=date;
t:=time;
reg:=Tregistry.Creat;
try
reg.rootkey:=hkey_current_user;
if
reg.openkey('test',true)
then
begin
reg.writecurrency('currency',100);
reg.writebinarydata('binarydata',buffer,10);end;
finally
reg.closekey;
reg.free;
end;end;end.
此程序主要是往注册表里写入内容,hkey_current_user\text\下写入两个键值项
编译的 时候怎么硕没有声明tregistry.creat哪?
解决方案 »
- ReportBuilder合计问题!小弟在线等待,急.....
- 我用了多次sqloledb,运行程序时,总是超时,什么原因?是不是要释放连接呢?高手帮我看看。。。
- 今天写程序又碰到一个问题了,麻烦大家进入帮忙看一下。谢谢
- 简单问题问问!(在线等!)
- 请问怎么取出datetimepicker的日期呀!
- 有关字体的问题
- sql 问题???
- 你知道这样的软件吗?把一个gif动画拆分成好多个bmp文件,留个下载地址。
- 计算字段,对于我太难了,各路英雄,帮忙!帮忙!谢谢!谢谢!
- 请问如何实现网上实时传送图像?如同网上直播一般。
- 如何储存和恢复一个对象(只管 Publish 了的属性)
- 高手问题,如何在程序中判断本机是否安装了ORACLE服务器端!!!!!
reg:=tregistry.create;