21 May 2007

MEMBUAT PROGRAM MENEMUKAN FORM

Semoga berhasil... Jika ada masalah kirim email ke : putu_dalungcity@yahoo.co.id
Nama : Abryan Tata Pangarsa
Web : abryantp.blogspot.com
Buat 2 Form
Sourcecode [ Membuat program menemukan form ] :
Untuk Form1 :
unit Abryan;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ComCtrls, XPMan;
type
TForm1 = class(TForm)
ProgressBar1: TProgressBar;
Button1: TButton;
XPManifest1: TXPManifest;
procedure FormCreate(Sender: TObject);
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
uses uAbryan;
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
begin
form1.Caption:='Pencarian form';
button1.Caption:='Cari form';
form1.Position:=poDesktopCenter;
form1.BorderStyle:= bsDialog;
end;
procedure TForm1.Button1Click(Sender: TObject);
var baris,nilai:integer;
begin
baris:=150000;
ProgressBar1.Max:=baris;
ProgressBar1.Min:=0;
for nilai:= 1 to baris do
ProgressBar1.Position:= nilai;
form2.ShowModal;
end;
end.
Untuk Form2 :
unit uAbryan;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, XPMan;
type
TForm2 = class(TForm)
Button1: TButton;
XPManifest1: TXPManifest;
procedure FormCreate(Sender: TObject);
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form2: TForm2;
implementation
{$R *.dfm}
procedure TForm2.FormCreate(Sender: TObject);
begin
form2.Width:= 300;
form2.Height:= 300;
form2.Position:=poDesktopCenter;
button1.Caption:='close';
form2.Caption:='Form lain sudah ditemukan';
end;
procedure TForm2.Button1Click(Sender: TObject);
begin
close;
end;
end.

COMMENTS :

Don't Spam Here

0 komentar to “MEMBUAT PROGRAM MENEMUKAN FORM”

 

Copyright © 2009 Fresh Themes Gallery | NdyTeeN. All Rights Reserved. Powered by Blogger and Distributed by Blogtemplate4u .