How to send char as message to another application The following code is used to insert a character into another application - Notepad.procedure TForm1.Button1Click(Sender: TObject) ;var g,d:integer;begin {Find the main window of the Application} g:=FindWindow('Notepad',nil) ; {Find the w... |
Does my CD-ROM drive contain an audio CD? 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 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: \Shared1_svrShared1WGroupsNetworkOrders.xlsR... |
Checking If File Is In Use IsFileInUse will return true if the file is locked for exclusive access. It would fail if the file doesn't exist at all. function IsFileInUse(fName : string) : boolean;var HFileRes : HFILE;begin Result := false; if no... |
Browse for Computers, Folders, Files and Printers 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... |
How to draw Transparent Text on bitmap You can set transparent mode by calling SetBkMode function.procedure TForm1.Button1Click(Sender: TObject);begin with Image1.Picture.Bitmap.Canvas do begin Font.Color := clBlue; Brush.Style := bsclear;  ... |
Keyboard event detection (Key Tracker) Track your key Press |