D E L P H I 's Search Engine : FunnyLogo.info : Personal Search Engine Maker of Style Yahoo

 

Web ImagesVideoNewsMapsBooks More»
 
 Advanced Search
 Preferences
 Language Tools


BookMark     Create your own Search Engine Now


FunnyLogo is not affiliated with Google Inc.
Trademarks remain trademarks of their respective companies.
© 2007 FunnyLogo

Sedo - Buy and Sell Domain Names and Websites project info: funnylogo.info Statistics for project funnylogo.info etracker® web controlling instead of log file analysis
Tampilkan postingan dengan label File. Tampilkan semua postingan
Tampilkan postingan dengan label File. Tampilkan semua postingan

Kamis, 15 November 2007

Fungsi Terbilang pada Borland Delphi

Fungsi terbilang adalah suatu fungsi sederhana yang berguna untuk mengkonversikan dari angka ke dalam format huruf (terbilang) seperti halnya yang sering Anda lihat pada kuitansi.


Berikut ini adalah fungsi terbilang-nya.

function Terbilang(x:integer):string;
const
abil : array[0..11] of string[10]=('','satu','dua','tiga',
'empat','lima','enam','tujuh','delapan','sembilan',
'sepuluh','sebelas');

begin
if (x < 12) then
Result := ' ' + abil[x]
else
if (x < 20) then
Result := Terbilang(x-10) + ' belas'
else
if (x < 100) then
Result := Terbilang(x div 10) + ' puluh' + Terbilang(x mod 10)
else
if (x < 200) then
Result := ' seratus' + Terbilang(x-100)
else
if (x < 1000) then
Result := Terbilang(x div 100) + ' ratus' + Terbilang(x mod 100)
else
if (x < 2000) then
Result := ' seribu' + Terbilang(x-1000)
else
if (x < 1000000) then
Result := Terbilang(x div 1000) + ' ribu' + Terbilang(x mod 1000)
else
if (x < 1000000000) then
Result := Terbilang(x div 1000000) + ' juta' + Terbilang(x mod 1000000);
end;

Silakan saja Anda coba fungsi di atas pada Borland Delphi. Penulis sudah mencobanya pada Delphi 6.0. Demikianlah tulisan singkat mengenai fungsi terbilang pada Borland Delphi. Semoga bermanfaat bagi Anda semua

Silakan download source code lengkap dari project di atas

Read more.....

Sabtu, 10 November 2007

Extract an Icon From Application

procedure TForm1.Button1Click(Sender: TObject);
var
MyIcon : TIcon;
begin
if Opendialog1.Execute then
begin
MyIcon := TIcon.Create;
MyIcon.Handle := ExtractIcon(hInstance, PChar(Opendialog1.filename),0);
DrawIcon(Form1.Canvas.Handle, 10, 10,
MyIcon.Handle);
MyIcon.Free;
end;
end;

Read more.....

Get Windows Temporary Folder

If you need to get windows temporary folder for your application you need to follow this steps.

function GetTempDirectory: String;
var
TempDir: array[0..255] of Char;
begin
GetTempPath(255, @TempDir);
Result := StrPas(TempDir);
end;


procedure TForm1.BitBtn1Click(Sender: TObject);
begin
label1.Caption := gettempdirectory;
end;

Silahkan download aplikasinya

Read more.....