Showing posts with label Delphi. Show all posts
Showing posts with label Delphi. Show all posts
Monday
Presence Detect File
To check whether a file exists in a particular directory, you can use that function is served Delphi.The formula functions:
FileExists(const FileName:string):boolean.
The first step: put the Edit Button and in FormStep two: fill the program with the program listings 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;
Third step: Click on the Run.
Viewing File Size
To determine the size of a file, Delphi has provided the function filesize (var F): integer In this example the following program, I use the Windows API function GetFileSize (). Example Delphi program as follows: First step: design form with popertiey 2 Button, Edit1, OpenDialog The second step input the program listing as follows:
Input filter in the edit box
In order EditBox can only accept input only certain characters. For example in order EditBox can only be filled with numbers, not characters.
The following program shows how to EditBox can only be
Change the Background Toolbar of Windows Explorer with Bitmap Images
This program describes windos Explorer toolbar to change the background with a bitmap image. Who conducted the program is very simple, namely, providing data on key BackBitmapShell value HKEY_CURRENT_USER
Installing a new component in Delphi
Installing new components
Here we will give examples of how to install a new component in Delphi 3. Download Previous IEButton first component. The way is as follows:
- After you download and extract the file, then
Subscribe to:
Posts (Atom)