picture

Archive for the ‘Delphi’ Category

PDFCreator Parameters.

Tuesday, February 16th, 2010

PDFCreator is a free tool for printing PDF documents. After installation on your system it can be used as any other printer. In the project I’m currently involved in, we use PDFCreator calls within Delphi code to generate PDF documents. PDFCreator has a number of parameters, which can be set before printing a document. These parameters are summarized under the following link.

Threading in Delphi.

Tuesday, February 9th, 2010

Yesterday I had to realize a simple task: Load data from the database into a ComboBox in a separate thread. Threading in Delphi turned out to be quite easy. But still I faced several difficulties, i.e. weird effects. My thread looks pretty simple: (more…)

Remove Read Only Property of a File.

Thursday, February 4th, 2010

Recently I wrote a custom installer program and burned it to a CD together with particular files. After coping the files from the CD to the hard drive some files were set by Windows to read only. Below is the function to remove read only property of a file:
(more…)

Copy Directory in Delphi.

Wednesday, February 3rd, 2010

In order to copy the content of a directory to the new location, I used ShFileOperation function. Important: if you want to copy only the content of the folder and not the folder itself, the StrFrom parameter should end with *.* like C:\MyTestFolder\sourceFolder\*.*
(more…)

Delete Folder in Delphi.

Wednesday, February 3rd, 2010

Maybe there is another and more convenient way in Delphi to delete a folder, but what I could find and integrate into my application is the following function:
(more…)

Create a Desktop Icon in Delphi.

Wednesday, February 3rd, 2010

Sometimes you need to place an icon on the desktop, pointing to a particular directory/file. The code below demonstrates how to do it.
(more…)