谁有关于注册表方面的原代码啊,谢谢(0分)

  • 主题发起人 主题发起人 birch2002
  • 开始时间 开始时间
B

birch2002

Unregistered / Unconfirmed
GUEST, unregistred user!
谁有关于注册表方面的原代码啊,谢谢
 
哪方面的?是TRegistry的基本应用吗?还是具体到哪个方面?
 
随便都可以啊,涉及到最好多一点啊,谢谢
 
下面的东东是我学习的时候用,不知对你有没有帮助:(仔细看Button1Click这个事件)
unit Unit1;

interface

uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls,registry;

type
TForm1 = class(TForm)
Edit1: TEdit;
Button1: TButton;
Button2: TButton;
Button3: TButton;
Label1: TLabel;
Button4: TButton;
procedure Button1Click(Sender: TObject);
procedure Button4Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.DFM}
var
reg:TRegistry;
procedure TForm1.Button1Click(Sender: TObject);
begin
reg:=tregistry.create;
with reg do
begin
RootKey:=HKEY_LOCAL_MACHINE;
if not reg.KeyExists('Software/Microsoft/Windows/CurrentVersion/lyfkey'+edit1.text) then
begin
if application.messagebox('this key is not exesit,create it now? if you want to create it press enter ','ask to how to continue',MB_OKCANCEL)=idok then
begin
if reg.CreateKey('Software/Microsoft/Windows/CurrentVersion/lyfkey'+edit1.text) then
showmessage('create sussefull!!!');
end;
end
else
showmessage('the key'+' '+''''+edit1.text+''''+' '+' already exsit yet');
end;
end;
procedure TForm1.Button4Click(Sender: TObject);
begin
close;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
label1.top:=form1.Height -label1.Height-40 ;
label1.Left :=0;
label1.width:=form1.Width-50;
end;

end.
 
找到了一篇讲解,分别讲了几个方面的例子,你自己看吧
http://www2.ccw.com.cn/tips/9905/050604_05.asp
 
   
  http://www.cx66.com/cxgzs/program/delphi/710.htm
   
 
  
原理篇
http://download.pchome.net/user/delphi/delphiregi.htm

应用篇
http://www.4gee.com/colleges/programme/023.htm
http://www.5xsoft.com/data/200112/2508105901.htm
   
不够再找啊!
  
 
后退
顶部