genuinemails.com

Rabu, 03 Maret 2010

check whether a file exists in a particular directory

To check whether a file exists in a particular directory, you can use the provided functions in Delphi.
Formula functions:
FileExists (const FileName: string): boolean.
The first step: Lay and Edit Button in the Form
Step two: fill the program with the program listing below

Procedure Tfrom.Button1Click(Sender:TObject);
begin
if Edit1.Text = ' ' then
ShowMessage('isikankan nama file yang dicari')
else
begin
if FileExits(Edit1.Text) = true then // jika ada
ShowMessage('file " ' +Edit1.Text + ' " ada. ')
else // Jika tidak ada
showMessage('File " ' +Edit1.Text + ' " tidak dtemukan. ');
end;
end;
step 3 : Klik Run

Read More......

changing background windos Explorer toolbar with a bitmap image

This program describes the changing background windos Explorer toolbar with a bitmap image. Made this very simple program, which provides data on key BackBitmapShell value HKEY_CURRENT_USER \ Software \ Microsoft \ Internet Explorer \ toolbar and value is a bitmap file path is used.
Fom design on 2 Button and take poperty Dialogue with OpenPictureDialog, and also EditText

This complete program listing :

Procedure Tform1.Button1Click(Sender:TObject);
begin
if OpenPictureDialog1.Execute then
Edit1.Text:=OpenPicutreDialog1.FileName;
end;

Procedure Tfrom1.Button2Click(Sender:TObject);
var Register:Tregister;
begin
Register:=Tregister.create;
Register.RootKey:=HKEY_CURRENT_USER;
try
try
Register.OpenKey('\Software\Microsoft\Internet Explorer\'+ 'Toolbar',True);
Register.WriteString('BackBitmapShell',Edit1.Text);
ShowMessage('Berhasil mengubah background toolbar'+#13+'Untuk melihat hasilnya,buka'+
' "Windows Explorer" baru.');
Except on ERegistryException do
ShowMessage('Gagal mengubah background toolbar explorer');
end;
Finally
Register.CloseKey;
Register.Free;
end;

Read More......

BlogCatalog

My Sponsor