delphi

Delphi Windows Services command line arguments

I have a Deplhi based Windows Service that, on installation, parses some command line arguments. I want those arguments to be added to the services command line (ImagePath value on the registry) so that the service is always started with them. How can I accomplish this? I want the regedit look like this: at registry key HKEY_LOCAL_MACH...

TClientDataset: 'Fieldtype not supported for XML.'

I've got a bunch of data loaded into a TClientDataset, representing an array of complex objects. But when I try to run Dataset.SaveToFile('c:\test.xml', dfXMLUTF8); it doesn't like it: Project testing.exe raised exception class EDBClient with message 'Fieldtype not supported for XML.'. This is a lot less useful than it should be, f...

BASSMOD_MusicLoad loading from resource in Delphi

Ok, So I created a RC file: Chipas RCDATA "chiptune.xm" And compiled it to RES. Added this RES, BASSMOD.pas and BASSMOD.dll to my project dir. Now I need to play that chiptune from the resource. How can I do it? I tried this, but it doesn't loads. procedure play; begin MyResource:=FindResource(HInstance, 'Chipas', RT_RCDATA); if M...

CD Ripping in Delphi

Is there any example how to rip audio cd in delphi? ...

Are framework dependencies a problem?

I know someone who has a one-man company developing applications in Delphi and Pascal. He is running into problems in handling the workload. Thus, he needs to find an employee. Having trouble finding people, he said his company is not attractive for graduated students. One of the reasons was that he uses a platform that is not that popu...

Delphi object persistence, what is the best way

I have developed application for drawing some shapes (lines mostly) , now i need to be able to store sketch to a file, i know that delphi has build in routines for object persistance, but i have never used it. Can someone tell me can object persistence be used if i have to persist object that have also references to other objects (th...

Detect disk activity in Delphi

I'm using Delphi 2007. I am copying files to a remote drive. When the copying ends, I shutdown/standby the machine. It can happen that some files don't get copied from buffer to disk, and the remote disk gets disconnected, so the backup is not completed. I need to detect disk activity on that disk to properly be able to take the close a...

Copying portions of a tdbgrid to clipboard?

Is there any way to copy a selection of rows from a TDBGrid in Delphi 2007 to the clipboard easily? ...

Writing to the Event Log in Delphi

Hi how I get an application to write debug text to the Event Log window in the Delphi Ide (BDS2006) EDIT: how does one change the color of the text ? ...

What is the best way to do nested TRY AND FINALLY statement in Delphi

Hi What is the best way to do nested try & finally statements in delphi? var cds1 : TClientDataSet; cds2 : TClientDataSet; cds3 : TClientDataSet; cds4 : TClientDataSet; begin cds1 := TClientDataSet.Create(application ); try cds2 := TClientDataSet.Create(application ); try cds3 := TClientD...

Any information on a Turbo Delphi 2009 release?

Individually, the Turbo Delphi releases and the new improvements added in Delphi 2009 are two of the best things that have happened to Delphi in a long time. But currently you can only get one or the other. Does anyone know if Embarcadero has any plans to release a Turbo Delphi 2009? I'm a paying customer with my own copy of D2009, bu...

Why does Cut/Paste of form components sometimes stop working in Delphi 2007 IDE?

This is driving me crazy. I'm not going to take it anymore. I'm going to ask, even at the risk of eternal public humiliation! (If it's something really obvious or that I've done to the system myself). For reasons I've never quite had the patience to work out, every so often the form I'm working on in Delphi 2007's visual form editor goe...

Is it possible to create databases programmatically using DBX?

Looks like the TSQLConnection only connects to existing databases, and I could not find another component that allows me to send commands to the database server. I'm using Delphi 2009 with Firebird and MSSQL. One idea that came was to connect to a system database (master or tempdb in MSSQL for example) and then send create commands to ...

How do I compress multiple files into a single archive with Delphi

I need to compress multiple files into a single archive using Delphi. I'd prefer to use freeware components or open-source components because I am very very cheap :-) My primary requirements are: Possible to encrypt the archive Can create common archives that can be opened by anyone with a copy of WinZip Does anyone have suggestions...

Delphi: Handling user's font preference

I've come up with the call that gets the user's UI font preference (as opposed to Borland's hard-coded choice of "MS Sans Serif"). Let's pretend the user's font preference is: Segoe Print, 15pt I set the font of all items, on all forms, in all applications to: Segoe Print, 15pt Problem is that things are now cut off. Buttons are ...

Generating PDF with Quick Reports behind a Delphi Web Server

I have a Delphi web server providing some web services*. One of them is supposed to generate and return a PDF report. The PDF creation is done with a QReport that is then exported into a PDF file with the ExportToFilter procedure. The routine works fine when called from within an application, but when called behind a TIdTCPServer, it h...

Any delphi component for digital signing documents?

Hello there, I'm looking for a good standard based component for digitally sign documents with x509 certificates. I can't see no one native component for this. Only Activex components. ...

Finding System Fonts with Delphi

What is the best way to find all the system fonts a user has available so they can be displayed in a dropdown selection box? I would also like to distinguish between Unicode and non-Unicode fonts. I am using Delphi 2009 which is fully Unicode enabled, and would like a Delphi solution. ...

HTML Editor for CBuilder/Delphi

I need to find basic WYSIWYG HTML editor component for C++Builder 5 to let users to create some simple text that I will paste into existing HTML page template. Just a simple support to create links, add images, use headers/bold/italic. ...

Delphi code formatter

Are there any utilities that reformat Delphi code ? EDIT I am using Delphi 2006 Some feedback Thanks to all that answered this question I have been using the JCF code formatter - it works well and my code is been formated to Object Pascal Style Guide ...