Tuesday, August 19, 2008
Source code RSA unit 3
unit Unit3;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls,
Forms,
Dialogs, ExtCtrls, StdCtrls;
type
TForm3 = class(TForm)
Button1: TButton;
Button2: TButton;
Panel1: TPanel;
Edit1: TEdit;
Edit2: TEdit;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Edit3: TEdit;
Label4: TLabel;
Image1: TImage;
procedure chg1(Sender: TObject);
B-19
procedure chg(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure sh(Sender: TObject);
procedure cls(Sender: TObject; var CanClose: Boolean);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form3: TForm3;
implementation
uses Unit2,registry;
{$R *.dfm}
procedure TForm3.Button1Click(Sender: TObject);
var
reg:tregistry;
begin
reg:=tregistry.Create;
reg.RootKey:=HKEY_LOCAL_MACHINE;
reg.OpenKey('\SOFTWARE\Microsoft\Windows\CurrentVersion\',true);
//application.MessageBox('bik?','warning',MB_YESNO);
if edit2.Text<>'' then
begin
if edit2.Text=edit3.Text then
begin
try
reg.WriteString('Psid',edit2.Text);
except
end;
Button2Click(Sender);
end
else
begin
image1.Visible:=true;
end;
end;
if edit1.Text <> '' then
begin
if image1.Visible=false then
begin
try
reg.WriteString('Psnm',edit1.Text);
except
end;
close
end;
end;
reg.Free;
end;
//application.MessageBox('ssbik?','warning',MB_YESNO+MB_ICONWARNING);
procedure TForm3.Button2Click(Sender: TObject);
begin
close;
end;
procedure TForm3.chg(Sender: TObject);
begin
image1.Visible:=false;
end;
procedure TForm3.chg1(Sender: TObject);
begin
chg(sender);
end;
procedure TForm3.cls(Sender: TObject; var CanClose: Boolean);
begin
main3.Close;
end;
procedure TForm3.sh(Sender: TObject);
begin
image1.Visible:=false;
edit1.Text:='';
edit2.Text:='';
edit3.Text:='';
end;
end.
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment
sabar ya, komentar anda akan kami moderasi terlebih dahulu. laporkan kepada kami apabila ada post yang masih berbentuk kiri ke kanan. nuhun