Cari Blog Ini

Minggu, 12 Desember 2010

mp3 (akhirnya)

minimize
normal
nahhh akhirnya bisa juga...tapi nyontex...nah yang mau tau programnya tanya yang buat aja,ne websitenya klik disini
terus kalau mau tanya2 langsung sama dia,ne alamat emailnya klik disini lho
saya tidak berhak,coz saya cuma nyontex...wkakaka!!!

simple mp3 yang gak slesei2...


walahhh...msh gak selesei juga ne...tapi ada yang lebih dari yag satu ne,ada timernya,bisa buat nampilin data drive...tapi cuma itu...xe2 dari sapa ya???klo g salah ini urlnya
ni sintaknya...(tolong bantu biar jadi sempurna)
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ExtCtrls, FileCtrl, Gauges, MPlayer;

type
  TForm1 = class(TForm)
    MediaPlayer1: TMediaPlayer;
    Timer1: TTimer;
    Gauge1: TGauge;
    FileListBox1: TFileListBox;
    DirectoryListBox1: TDirectoryListBox;
    DriveComboBox1: TDriveComboBox;
    Label1: TLabel;
    Label3: TLabel;
    Label2: TLabel;
    Label4: TLabel;
    Panel2: TPanel;
    Panel1: TPanel;
    Button1: TButton;
    procedure Timer1Timer(Sender: TObject);
    procedure FileListBox1Change(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure MediaPlayer1Click(Sender: TObject; Button: TMPBtnType;
      var DoDefault: Boolean);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation


{$R *.dfm}

procedure TForm1.Timer1Timer(Sender: TObject);
var
   Posisi:longint;
begin
    Posisi:=MediaPlayer1.Position;
    Label4.Caption:=IntToStr(Posisi)+' ms';
    Gauge1.Progress:=MediaPlayer1.Position
end;

procedure TForm1.FileListBox1Change(Sender: TObject);
begin
if (FileListBox1.FileName<>'')then
    begin
        MediaPlayer1.FileName:=FileListBox1.FileName;
        MediaPlayer1.Open;
        MediaPlayer1.TimeFormat:=tfMilliSeconds;
        label3.Caption:=IntToStr(MediaPlayer1.Length)+' ms';
    end;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
DriveComboBox1.DirList:=DirectoryListBox1;
    DirectoryListBox1.FileList:=FileListBox1;
    FileListBox1.Mask:='*.WAV;*.MID;*.DAT;*.MPG;*.MP3';
    MediaPlayer1.VisibleButtons:=[btPlay,btPause,btStop];
    MediaPlayer1.Width:=Gauge1.Width;
    timer1.Enabled:=false;
end;

procedure TForm1.MediaPlayer1Click(Sender: TObject; Button: TMPBtnType;
  var DoDefault: Boolean);
begin
    Case Button of
    btPlay:
    Begin
        if (MediaPlayer1.Mode<>mpPaused)then
        Begin
           Timer1.Interval:=250;
           Gauge1.MinValue:=0;
           Gauge1.MaxValue:=MediaPlayer1.Length;
           Gauge1.Progress:=0;
        End;
        Timer1.Enabled:=True;
        Gauge1.Enabled:=True;
    End;

    btPause:
    Begin
        if (MediaPlayer1.Mode=mpPaused) then
        Begin
            Timer1.Enabled:=True;
            Gauge1.Enabled:=True;
        End
        Else
        Begin
            Timer1.Enabled:=False;
            Gauge1.Enabled:=False;
        End;
    End;

    btStop:
    Begin
        MediaPlayer1.Position:=0;
        Timer1.Enabled:=False;
        Gauge1.Enabled:=False;
    End;
end;
end;

end.

simple mp3(lanjutan)


wueeee...tambah rumitkan???temen w yang bikin rumit(malem2 sms mulu)yahh pelan2 aja...w dpt source codenya dari sapa y???lupa ix...tp yang ini sudah lumayan bisa nampilin artis,album,track,dll.
tapi w masih bingung walaupun sudah bisa insert file banyak tapi tiap satu lagu selesai lagu berikutnya gak mau mulai!!!kenapa ya???(bantu jawab donx!!!)   ;) ;) ;)
sintaknya ini...
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ComCtrls, ExtCtrls, StdCtrls, MPlayer, Buttons, jpeg;

type
  TForm1 = class(TForm)
    txtfolder: TStaticText;
    btnopenfolder: TBitBtn;
    mp3player: TMediaPlayer;
    GroupBox1: TGroupBox;
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    Label4: TLabel;
    Label5: TLabel;
    Label6: TLabel;
    Edtitle: TEdit;
    Edartist: TEdit;
    Edalbum: TEdit;
    Edyear: TEdit;
    Edgenre: TEdit;
    Edcomment: TEdit;
    mp3list: TListBox;
    progresTimer: TTimer;
    Button1: TButton;
    Progress: TProgressBar;
    Image1: TImage;
    procedure btnOpenFolderClick(Sender: TObject);
    procedure mp3ListClick(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure ProgresTimerTimer(Sender: TObject);
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

type
  TID3Rec = packed record
    Tag     : array[0..2] of Char;
    Title,
    Artist,
    Comment,
    Album   : array[0..29] of Char;
    Year    : array[0..3] of Char;
    Genre   : Byte;
  end;

const
  MaxID3Genre=147;
  ID3Genre: array[0..MaxID3Genre] of string = (
    'Blues', 'Classic Rock', 'Country', 'Dance', 'Disco', 'Funk', 'Grunge',
    'Hip-Hop', 'Jazz', 'Metal', 'New Age', 'Oldies', 'Other', 'Pop', 'R&B',
    'Rap', 'Reggae', 'Rock', 'Techno', 'Industrial', 'Alternative', 'Ska',
    'Death Metal', 'Pranks', 'Soundtrack', 'Euro-Techno', 'Ambient',
    'Trip-Hop', 'Vocal', 'Jazz+Funk', 'Fusion', 'Trance', 'Classical',
    'Instrumental', 'Acid', 'House', 'Game', 'Sound Clip', 'Gospel',
    'Noise', 'AlternRock', 'Bass', 'Soul', 'Punk', 'Space', 'Meditative',
    'Instrumental Pop', 'Instrumental Rock', 'Ethnic', 'Gothic',
    'Darkwave', 'Techno-Industrial', 'Electronic', 'Pop-Folk',
    'Eurodance', 'Dream', 'Southern Rock', 'Comedy', 'Cult', 'Gangsta',
    'Top 40', 'Christian Rap', 'Pop/Funk', 'Jungle', 'Native American',
    'Cabaret', 'New Wave', 'Psychadelic', 'Rave', 'Showtunes', 'Trailer',
    'Lo-Fi', 'Tribal', 'Acid Punk', 'Acid Jazz', 'Polka', 'Retro',
    'Musical', 'Rock & Roll', 'Hard Rock', 'Folk', 'Folk-Rock',
    'National Folk', 'Swing', 'Fast Fusion', 'Bebob', 'Latin', 'Revival',
    'Celtic', 'Bluegrass', 'Avantgarde', 'Gothic Rock', 'Progressive Rock',
    'Psychedelic Rock', 'Symphonic Rock', 'Slow Rock', 'Big Band',
    'Chorus', 'Easy Listening', 'Acoustic', 'Humour', 'Speech', 'Chanson',
    'Opera', 'Chamber Music', 'Sonata', 'Symphony', 'Booty Bass', 'Primus',
    'Porn Groove', 'Satire', 'Slow Jam', 'Club', 'Tango', 'Samba',
    'Folklore', 'Ballad', 'Power Ballad', 'Rhythmic Soul', 'Freestyle',
    'Duet', 'Punk Rock', 'Drum Solo', 'Acapella', 'Euro-House', 'Dance Hall',
    'Goa', 'Drum & Bass', 'Club-House', 'Hardcore', 'Terror', 'Indie',
    'BritPop', 'Negerpunk', 'Polsk Punk', 'Beat', 'Christian Gangsta Rap',
    'Heavy Metal', 'Black Metal', 'Crossover', 'Contemporary Christian',
    'Christian Rock', 'Merengue', 'Salsa', 'Trash Metal', 'Anime', 'Jpop',
    'Synthpop'  {and probably more to come}
  );

implementation

uses ShellAPI, ShlObj;

{$R *.DFM}

procedure FillID3TagInformation(mp3File:string; Title,Artist,Album,Year,Genre,Comment:TEdit);
var
    ID3 : TID3Rec;
    fmp3: TFileStream;
begin
  fmp3:=TFileStream.Create(mp3File, fmOpenRead);
  try
    fmp3.position:=fmp3.size-128;
    fmp3.Read(ID3,SizeOf(ID3));
  finally
    fmp3.free;
  end;

 { or the non Stream approach - as in ChangeID3Tag procedure
 try
   AssignFile(fMP3, mp3File);
   Reset(fMP3);
   try
     Seek(fMP3, FileSize(fMP3) - 128);
     BlockRead(fMP3, ID3, SizeOf(ID3));
   finally
   end;
 finally
   CloseFile(fMP3);
 end;
 }

 if ID3.Tag <> 'TAG' then begin
   Title.Text:='Wrong or no ID3 tag information';
   Artist.Text:='Wrong or no ID3 tag information';
   Album.Text:='Wrong or no ID3 tag information';
   Year.Text:='Wrong or no ID3 tag information';
   Genre.Text:='Wrong or no ID3 tag information';
   Comment.Text:='Wrong or no ID3 tag information';
 end else begin
   Title.Text:=ID3.Title;
   Artist.Text:=ID3.Artist;
   Album.Text:=ID3.Album;
   Year.Text:=ID3.Year;
   if ID3.Genre in [0..MaxID3Genre] then
     Genre.Text:=ID3Genre[ID3.Genre]
   else
     Genre.Text:=IntToStr(ID3.Genre);
   Comment.Text:=ID3.Comment
 end;
end;


procedure ChangeID3Tag(NewID3: TID3Rec; mp3FileName: string);
var
  fMP3: file of Byte;
  OldID3 : TID3Rec;
begin
  try
    AssignFile(fMP3, mp3FileName);
    Reset(fMP3);
    try
      Seek(fMP3, FileSize(fMP3) - 128);
      BlockRead(fMP3, OldID3, SizeOf(OldID3));
      if OldID3.Tag = 'TAG' then
        { Replace old tag }
        Seek(fMP3, FileSize(fMP3) - 128)
      else
        { Append tag to file because it doesn't exist }
        Seek(fMP3, FileSize(fMP3));
      BlockWrite(fMP3, NewID3, SizeOf(NewID3));
    finally
    end;
  finally
    CloseFile(fMP3);
  end;
end;


procedure FillMP3FileList(Folder: string; sl: TStrings);
var Rec : TSearchRec;
begin
 sl.Clear;
 if SysUtils.FindFirst(Folder + '*.mp3', faAnyFile, Rec) = 0 then
  try
    repeat
      sl.Add(Rec.Name);
    until SysUtils.FindNext(Rec) <> 0;
  finally
    SysUtils.FindClose(Rec);
  end;
end;

function BrowseDialog(const Title: string; const Flag: integer): string;
var
  lpItemID : PItemIDList;
  BrowseInfo : TBrowseInfo;
  DisplayName : array[0..MAX_PATH] of char;
  TempPath : array[0..MAX_PATH] of char;
begin
  Result:='';
  FillChar(BrowseInfo, sizeof(TBrowseInfo), #0);
  with BrowseInfo do begin
    hwndOwner := Application.Handle;
    pszDisplayName := @DisplayName;
    lpszTitle := PChar(Title);
    ulFlags := Flag;
  end;
  lpItemID := SHBrowseForFolder(BrowseInfo);
  if lpItemId <> nil then begin
    SHGetPathFromIDList(lpItemID, TempPath);
    Result := IncludeTrailingBackslash(TempPath);
    GlobalFreePtr(lpItemID);
  end;
end;


procedure TForm1.btnOpenFolderClick(Sender: TObject);
var mp3Folder : string;
begin
 mp3Folder := BrowseDialog('Choose a folder with mp3 files', BIF_RETURNONLYFSDIRS);
 if mp3Folder = '' then Exit;

 txtFolder.Caption := mp3Folder;

 FillMP3FileList(mp3Folder, mp3List.Items);
end;

procedure TForm1.mp3ListClick(Sender: TObject);
 var mp3File: string;
begin
  if mp3List.Items.Count=0 then exit;
  mp3File := Concat(txtFolder.Caption, mp3List.Items.Strings[mp3List.ItemIndex]);
  if not FileExists(mp3File) then begin
   ShowMessage('MP3 file '+#13#10+ mp3File +#13#10+'does not exist!');
   exit;
  end;

  FillID3TagInformation(mp3File, edTitle, edArtist, edAlbum, edYear, edGenre, edComment);

  Progress.Max:=0;

  mp3player.Close;
  mp3player.FileName:=mp3File;
  mp3player.Open;

  Progress.Max := mp3player.Length;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
  txtFolder.Caption := ExtractFilePath(Application.ExeName);
  FillMP3FileList(txtFolder.Caption, mp3List.Items);
  Progress.Max:=0;
end;

procedure TForm1.ProgresTimerTimer(Sender: TObject);
begin
  if Progress.Max<>0 then
    Progress.Position := mp3player.Position;
end;

end.

simple mp3


belajar dari kakak se...xe2  ;p ;p ;p ;p ;p
mp3 player(tapi cuma bisa satu lagu,kalau mau denger yang lain harus buka file lagi,gak praktis)

unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ComCtrls, MPlayer, ExtCtrls;

type
  TForm1 = class(TForm)
    Timer1: TTimer;
    OpenDialog1: TOpenDialog;
    Panel1: TPanel;
    Label1: TLabel;
    MediaPlayer1: TMediaPlayer;
    ProgressBar1: TProgressBar;
    Edit1: TEdit;
    Button1: TButton;
    Button2: TButton;
    procedure Button2Click(Sender: TObject);
    procedure Button1Click(Sender: TObject);
    procedure Timer1Timer(Sender: TObject);
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
if opendialog1.Execute then
  begin
  edit1.Text:=opendialog1.FileName;
  end;
Progressbar1.Max:=0;
MediaPlayer1.Close;
MediaPlayer1.FileName:=edit1.Text;
MediaPlayer1.Open;
Progressbar1.Max:=MediaPlayer1.Length
end;

procedure TForm1.Timer1Timer(Sender: TObject);
begin
if Progressbar1.Max<>0 then
Progressbar1.Position:=MediaPlayer1.Position;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
Progressbar1.Position:=0;
end;

end.

Sabtu, 11 Desember 2010

contoh delphi


 database a;
database b;
form1
form2
sintak form1
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, DBCtrls, DB, DBTables, Grids, DBGrids, ExtCtrls, jpeg;

type
  TForm1 = class(TForm)
    Panel1: TPanel;
    DBGrid1: TDBGrid;
    DataSource1: TDataSource;
    Table1: TTable;
    DBNavigator1: TDBNavigator;
    Button1: TButton;
    Button2: TButton;
    Image1: TImage;
    Image2: TImage;
    Label1: TLabel;
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

uses Unit2;

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
form2.show;
form1.Hide;
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
close;
end;

end.

sintak form2

unit Unit2;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, DB, DBTables, ComCtrls, ExtCtrls, StdCtrls, ExtDlgs, DBCtrls,
  Mask, jpeg;

type
  TForm2 = class(TForm)
    Panel1: TPanel;
    GroupBox1: TGroupBox;
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    Label4: TLabel;
    RadioGroup1: TRadioGroup;
    tglk: TDateTimePicker;
    DataSource1: TDataSource;
    Table1: TTable;
    DataSource2: TDataSource;
    Table2: TTable;
    Label5: TLabel;
    Label6: TLabel;
    DBImage1: TDBImage;
    index: TOpenPictureDialog;
    GroupBox2: TGroupBox;
    GroupBox3: TGroupBox;
    GroupBox4: TGroupBox;
    Edit5: TEdit;
    Label8: TLabel;
    Edit6: TEdit;
    Label9: TLabel;
    Label10: TLabel;
    Edit8: TEdit;
    Label11: TLabel;
    Button3: TButton;
    Label7: TLabel;
    Label12: TLabel;
    Label13: TLabel;
    Label14: TLabel;
    DBEdit1: TDBEdit;
    DBEdit2: TDBEdit;
    DBEdit3: TDBEdit;
    DBEdit4: TDBEdit;
    Label15: TLabel;
    Label16: TLabel;
    Edit2: TEdit;
    Edit3: TEdit;
    Label17: TLabel;
    Label18: TLabel;
    Edit4: TEdit;
    Label19: TLabel;
    Label20: TLabel;
    Label21: TLabel;
    Label22: TLabel;
    Label23: TLabel;
    Label24: TLabel;
    Edit10: TEdit;
    Edit11: TEdit;
    Label25: TLabel;
    Label26: TLabel;
    Edit12: TEdit;
    Label27: TLabel;
    Label28: TLabel;
    Label29: TLabel;
    Label30: TLabel;
    Button1: TButton;
    Button4: TButton;
    Button5: TButton;
    ComboBox1: TComboBox;
    ComboBox2: TComboBox;
    ComboBox3: TComboBox;
    exit: TButton;
    Image1: TImage;
    Image2: TImage;
    Image3: TImage;
    Image4: TImage;
    Image5: TImage;
    Image6: TImage;
    procedure RadioGroup1Click(Sender: TObject);
    procedure DBImage1Click(Sender: TObject);
    procedure Button3Click(Sender: TObject);
    procedure Button1Click(Sender: TObject);
    procedure Button4Click(Sender: TObject);
    procedure Button5Click(Sender: TObject);
    procedure exitClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form2: TForm2;
  x:integer;

implementation

uses Unit1;

{$R *.dfm}

procedure TForm2.RadioGroup1Click(Sender: TObject);
begin
   if RadioGroup1.ItemIndex=0 then
   begin
      groupbox2.Visible:=true;
      groupbox3.Visible:=false;
      groupbox4.Visible:=false;
   end;
   if RadioGroup1.ItemIndex=1 then
   begin
      groupbox3.Visible:=true;
      groupbox2.Visible:=false;
      groupbox4.Visible:=false;
   end;
   if RadioGroup1.ItemIndex=2 then
   begin
      groupbox4.Visible:=true;
      groupbox2.Visible:=false;
      groupbox3.Visible:=false;
   end
end;

procedure TForm2.DBImage1Click(Sender: TObject);
begin
if index.Execute then
      dbimage1.Picture.LoadFromFile(index.FileName);
end;

procedure TForm2.Button3Click(Sender: TObject);
var x : integer;
begin
   case combobox3.ItemIndex of
      0 : x:=10000000;
      1 : x:=15000000;
      2 : x:=20000000;
      end;
label13.Caption:=inttostr(x+strtoint(edit6.Text)+strtoint(edit8.text));
label14.Caption:=inttostr(strtoint(label13.caption)+strtoint(edit5.Text));
end;

procedure TForm2.Button1Click(Sender: TObject);
var x : integer;
begin
   case combobox2.ItemIndex of
      0 : x:=10000000;
      1 : x:=15000000;
      2 : x:=20000000;
      end;
label19.Caption:=inttostr(x+strtoint(edit3.Text)+strtoint(edit4.text));
label22.Caption:=inttostr(strtoint(label19.caption)+strtoint(edit2.Text));
end;

procedure TForm2.Button4Click(Sender: TObject);
var x : integer;
begin
   case combobox1.ItemIndex of
      0 : x:=10000000;
      1 : x:=15000000;
      2 : x:=20000000;
      end;
label27.Caption:=inttostr(x+strtoint(edit11.Text)+strtoint(edit12.text));
label30.Caption:=inttostr(strtoint(label27.caption)+strtoint(edit10.Text));
end;

procedure TForm2.Button5Click(Sender: TObject);
begin
form1.show;
form2.Hide;
end;

procedure TForm2.exitClick(Sender: TObject);
begin
application.Terminate;
end;

end.

Sabtu, 04 Desember 2010

makalah bahasa indonesia

Penggunaan Tata Bahasa Indonesia yang Baik dan Benar
Makalah Ini Disusun untuk Memenuhi Tugas Mata Kuliah Bahasa Indonesia yang Diampu Oleh Dra. Rati Riana


Disusun Oleh
Nama  : Avid Nurosid
NIM    : G131090032

Program Studi Sistem Informasi
Fakultas Teknologi Informasi dan Komunikasi
Universitas Semarang
2010
lumayan lho ni makalah dapat nilai A...xe2 seperti sebelumnya download selengkapnya di  

agama islam

RESUME BUKU
MENGAPA RASULULLAH BERPOLIGAMI
KARYA : DR. AHMAD AL HUFY

TUGAS MATA KULIAH
PENDIDIKAN AGAMA ISLAM
DOSEN : DRS. DARYONO, MSI





OLEH
NAMA : AVID NUROSID
NIM : G.131.09.0032
FAKULTAS TEKNOLOGI INFORMASI DAN KOMUNIKASI
UNIVERSITAS SEMARANG
2010

ehmm bt lengkapnya download aja di  http://www.keepandshare.com/doc/2420664/agama-53k?da=y

Jumat, 03 Desember 2010

delphi repeated 1-10






Created with Delphi 7 by Avid/Kira
Form ‘perulangan angka’


Sintak:
unit Unit1;
interface
uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;
type
  TForm1 = class(TForm)
    Button1: TButton;
    Button2: TButton;
    Button3: TButton;
    Memo1: TMemo;
    Memo2: TMemo;
    Memo3: TMemo;
    Button4: TButton;
    procedure Button1Click(Sender: TObject);
    procedure Button4Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;
var
  Form1: TForm1;
implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
var x:integer;
begin
  if ((sender as tbutton).tag=1) then
  for x:=1 to 10 do
  memo1.lines.add(inttostr(x))
  else
  if ((sender as tbutton).tag=2) then
begin
  x:=1;
  repeat
  memo2.lines.add(inttostr(x));
  inc(x);
  until x>10;
  end
  else if ((sender as tbutton).tag=3) then
  begin
  x:=1;
  while (x<=10) do
  begin
  memo3.lines.add(inttostr(x));
  inc(x);
  end;
end;
{
begin
case (sender as tbutton).tag of
1:for x:=1 to 10 do
  memo1.lines.add(inttostr(x));
2:begin
  x:=1;
  repeat
  memo2.lines.add(inttostr(x));
  inc(x);
  until x>=10;
  end;
3:begin
  x:=1;
  while (x:=10) do
  begin
  memo3.lines.add(inttostr(x));
  inc(x);
  end;
  end;
  end;
}
end;
procedure TForm1.Button4Click(Sender: TObject);
begin
application.Terminate;
end;

end.

delphi repeated words

Created with Delphi 7 by Avid/Kira
Form ‘perulangan kata’


Sintak:
unit Unit1;

interface

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

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

var
Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button4Click(Sender: TObject);
begin
application.terminate;
end;

procedure TForm1.Button1Click(Sender: TObject);
var x:integer;
begin
for x:=1 to 10 do
memo1.lines.add(edit1.text);
end;

procedure TForm1.Button2Click(Sender: TObject);
var x:integer;
begin
x:=1;
repeat
memo2.lines.add(edit1.text);
inc(x);
until x>10;
end;

procedure TForm1.Button3Click(Sender: TObject);
var x:integer;
begin
x:=1;
while (x<=10) do
begin
memo3.lines.add(edit1.text);
inc(x);
end;
end;
end.