BMP to JPG.zip

Find File at certain directory in Delphi

434

This function we show below receives as parameters a file specification (like for example 'C: mp*.tmp' or 'C:*' if you want to search the entire hard disk.) and optionally a set of attributes (exactly as Delphi's FindFirst function),and it returs a StringL...

How to get get IE favorites

448

The GetIEFavourites function called from the OnClick event of a button returns a list of all the favorites from your Internet Explorer in a ListBox.

Reading a directory content

440

The following example lists all files and subdirectories of the C:Windows directory into a TListBox called ListBox1:Usage:Followings are the source code for FindAll procedure.

Building a Basic DNS Server in PHP/Python: A Beginner's Guide

731

Creating a full-fledged DNS server in PHP is not recommended for production environments due to performance and security concerns. DNS servers require low-level networking capabilities and efficient handling of DNS protocol messages, which PHP is not optim...

Dynamic DNS Made Easy: Building a Python-Based Solution

793

Creating a dynamic DNS (Domain Name System) service in Python involves several components: a server that listens for DNS queries, a database to store mappings between domain names and IP addresses, and functionality to update these mappings dynamically. Be...

Exploring the Depths of Data Transfer: sendfile vs. kTLS

Exploring the Depths of Data Transfer: sendfile vs. kTLS

1,314

When optimizing the performance of web servers and ensuring secure data transmission, two technologies often come into play: sendfile and Kernel TLS (kTLS). Both are designed to enhance efficiency in different ways, primarily in the context of sending data...

I want to select directory(folder) not file. How can I do that ?

614

Delphi provides function for directory(folder) selection as following. The above function is tested on Delphi 2009,but UI is more like windows 3.1.So I recommend you to use below function which calls shell API on Microsoft Windows System.

Retrieving all image links from an HTML document

416

Here's how to obtain all image links from an HTML document.The GetImageLinks procedure fills a TStrings object with the value of the SRC property of the IMG HTML element.Note: if the images have relative links,you will have to parse the document url and pr...

List All Network Drives

389

To show a list of all mapped network drives,use the GetNetworkDriveMappings function.Example usage: .

Download a file from the Internet with progress indicator

550

If you need to save the contents of a specified URL to a file - and be able to track the download progress,use the TDownLoadURL.While TDownLoadURL is writing to the specified file,it periodically generates an OnDownloadProgress event,so that you can provid...

Path shortener: c:\ABC...DEF.ghi

438

Sometimes when a huge path [any long string] is to be displayed in a small space,it is desirable to see the start and the end of the path with ellipses in-between,rather than truncating one of the ends.For example"C:\Program Files\Delphi\DDropTargetDemomai...

How to Split and Merge Files

617

There are times when you need to split a large file into several smaller ones (for whatever the purpose is). The following two methods use Delphi TStream objects to break a file into several files with predefined size; and to merge those files back to the ...

Get File 'Last Modified' attribute

465

This function is useful to get file attribute.Usage: .In addition,below function must be included in order to use above function.

Delete folders recursively

417

The following function completely deletes a directory regardless of whether the directory is filled or has subdirectories.No confirmation is requested so be careful.If the operation is successful then True is returned,False otherwise.Usage:In order to use ...

Delete files with the ability to UNDO

436

Here's a Delphi procedure that can delete a file with the ability to undo by sending the file to the "Recycle Bin."Function FileDeleteRB will return True if the operation was successful.uses ShellAPI;function FileDeleteRB( AFileName:string): boolean;var St...

Does my CD-ROM drive contain an audio CD?

361

We can use the Windows API function GetDriveType() to test if the drive is a CD-ROM drive then use the Windows API function GetVolumeInformation() to test if the VolumeName is 'Audio CD'.function IsAudioCD(Drive : char) : bool;var   DrivePath : s...

Convert a mapped drive to a full UNC path

830

Universal / Uniform Naming Convention.A UNC path describes the location of a volume,directory,or file.The format for a UNC path is \servervolumedirectoryfile and is not case-sensitive.For example:Rather than describe the location of a file or directory by ...

Checking If File Is In Use

917

IsFileInUse will return true if the file is locked for exclusive access.It would fail if the file doesn't exist at all.

Browse for Computers, Folders, Files and Printers

570

By using the SHBrowseForFolder Windows API function and Delphi we can invoke a Windows system dialog used to browse for files and folders on users hard drive as well as network computers and printers. First,let's look at what SHBrowseForFolder needs.Here's...