Delphi rs232 ComPort Libraries

  These components have demo applications which act as terminals with full duplex capability. See: Have […]

Online Embarcadero Delphi reference


Get Bluetooth com in delphi

function GetBlutoothComPort: String; var S, S1: String; Item: Integer; Reg: TRegistry; KeyList1, KeyList2: TStringList; begin Reg := TRegistry.Create; if Reg […]

Borlad database engine errors

BDE Error list: $0000 (0) = Successful completion. $0021 (33) = System Error $0022 (34) = Object of Interest Not […]

Download a file from Internet

{1.} uses URLMon, ShellApi; function DownloadFile(SourceFile, DestFile: string): Boolean; begin try Result := UrlDownloadToFile(nil, PChar(SourceFile), PChar(DestFile), 0, nil) = 0; except Result := False; end; end; procedure TForm1.Button1Click(Sender: TObject); const // URL Location SourceFile = ‘’; // Where to save the file DestFile = ‘c:tempgoogle-image.gif’; begin if DownloadFile(SourceFile, DestFile) then begin […]

Copy a file

{ The CopyFile function copies an existing file to a new file. CopyFile( lpExistingFileName : PChar, // name of an existing file lpNewFileName : PChar,      // name of new file bFailIfExists : Boolean);   // operation if file exists bFailIfExists: Specifies how this operation is to proceed if a file of the same name as that specified by lpNewFileName already exists. If this parameter is TRUE and the new file already exists, the function fails. If this parameter is FALSE and the new file already exists, the function overwrites the existing file and succeeds. } var fileSource, fileDest: string; begin fileSource := ‘C:SourceFile.txt’; fileDest := ‘G:DestFile.txt’; CopyFile(PChar(fileSource), PChar(fileDest), False); end;