delphi

Are there OpenOffice.org export components for Delphi (non-OLE)?

For document exchange, I would like to generate OpenOffice.org text and spreadsheet documents. So far I have found export components which require OpenOffice to be installed, using OLE. Are there already Delphi components available which can write native files for OpenOffice.org Writer or OpenOffice.org Calc? ...

Delphi - MadCrypt - Problem encrypting and decrypting a string

I am trying to encrypt a string but often only part of the string is being encrypted. I don't see anyone else having this problem so I am probably doing something wrong. I have the same problem in Delphi 2007 and 2009. I am using Win XP SP3. Here is the code: procedure TForm1.Button1Click(Sender: TObject); var sTestToConvert: ansi...

Delphi code completion performance

I have a few large (~600k lines of code) Delphi projects. They include some custom components which our team has developed. Often, when I call up code completion with ctrl+space or just by pressing ".", the IDE locks up and thinks really hard for a long time. Sometimes the delay can be a full minute, or more. Other times, it pops up ...

Default File Layout in Codegear C++ Builder (and Delphi)

I've had a major annoyance with the Borland/Codegear C++ Builder IDE for some time now. When I code I always use a standard layout for the code files. I have a standard header that I use, including, ie. the Licens of the file, filename, date, etc. But I haven't been able to find anywhere to insert this, so that when I - for instance - c...

Datagrid export to pdf

Hello, how can I can export the data shown on a DBgrid to a pdf file? ...

Your favourite third party components?

Here are mine: DevExpress VCL Subscription. Pretty expensive but worth a lot more. I', still amazed about how great a value they deliver to a developer. Grids are fantastic. Editors, skinning. all. Support is great. REMObjects SDK. I love the way I can break the functionality of a big project into a few of smaller ones and then exchang...

Black background while copying image from Firefox

An image is copied from Firefox into the Clipboard. My program gets it from clipboard and saves as a JPEG image. For some reason the image is saved with a black background. If I open the same URL in IE and copy the image into the Clipboard, the image is saved correctly by my program. I am using Delphi 7. I also tried to copy the image f...

how to make a screen saver preview in Delphi?

I want my screensaver appears in the screensaver preview box? ...

String representation of the content type of a Variant ?

Hi, first apologies for my english, I hope it make sense what I`ve wrote here. Now to my problem. How can I get the string representation of the content type of a Variant using TypInfo.GetEnumName(). I have tried the following, without luck, i get a numeric representation. myString := GetEnumName( TypeInfo(TVarType), TVarData(myVar).V...

Incorrect circular reference error

Our team had been using Delphi 6 for many years, then switched to Delphi 2006 years ago. With both versions we have the following problem: frequently the compiler complains about a unit which is supposedly used recursively. This unit is a 40k LOC unit which is at the core of a project with almost 1 million LOC (third party included). T...

Delphi 2009, MyDAC and relational database

Hello everyone! I have quite a problem concerning the use of relational database concepts in Delphi 2009 with MyDAC. I have a database structure that looks somehow like the following: Item id name Storage id name StorageItem id item_id storage_id place Now when I have an active dataset from "Item" how can I disp...

Code Analysis tool for Delphi 4

I need a Code analysis tool that supports Delphi 4. I tried some of the following Tools: Code healer (Supports from Delphi 5) Pascal analyzer Could you please say which will be the best tool for analyzing Delphi 4 code files. ...

Design-time drag and drop in Delphi?

Before Delphi 2006 (I think) introduced the TFlowPanel and TGridPanel, I did a control that was similar in concept. It still does a couple of things those controls do not do, and when upgrading my code to Delphi 2009, I decided to add a couple of enhancements to that as well. Right now, the order of the child controls is determined by t...

What is the best way to do application data exchange in Delphi without sockets?

I need a few of my related applications to communicate to each other (exchange data and initiate actions). Requirements are without packages and no sockets. So I guess that leaves named pipes, WM_CopyData (like Skype does it) and command parameters. What are your best practices? ...

Access an event on a DataModule from another Form

In Delphi 2009 I have a Form with a procedure MyProcedure that writes to a label on the Form. The form uses a DataModule with a ClientDataSet. When the AfterScroll event of the ClientDataSet is fired MyProcedure should be executed. To avoid circular references and more important, as I want the DataModule to be reusable, the DataModule s...

Highlighting effect to text and/or image similar to be synchronized with audio

I am looking how to approach following problem: We have application that displays text with audio recorded material. We use Browser Control (Internet Explorer) in Delphi App to do this. We respond to events in Delphi code setting innerHTML for elements if we have to update the style ... Now, request is to add option to dynamically move...

Interfaces with Generics - Setting to NIL

I am trying to implement clear in the following example code in Delphi 2009. interface ... TFoo<T : IInterface> = class(TObject) FField : T; procedure Clear; end; ... implementation ... procedure TFoo<T>.Clear; begin // Line Below Results In // E2010 Incompatible types: 'T' and 'Pointer' FField := nil; end; ... I c...

How to sort data as I want in a VirtualExplorerTreeview (VirtualShellTools)

Hello This is probably a very "dumb" question for whoever knows VirtualShellTools but I only started using it and couldn't find my answer in the demos' code. Please note that I'm also unfamiliar with virtualtreeview. I use a VirtualExplorerTreeview to display a directory structure, linked with a VirtualExplorerListview to display a cer...

Using the TParser in the Classes unit to parse a filter string

I want to parse a filter string similar to the following: ((Field1 = 'red') and (field2 = 2)) or (Field3 between 1 and 5) or (field4 in ['up', 'down']) I'd like to use the TParser in the Classes unit, but there does not seem to be much documentation or examples on it. ...

Is there any way of detecting if a drive is a SSD?

I'm getting ready to release a tool that is only effective with regular hard drives, not SSD (solid state drive). In fact, it shouldn't be used with SSD's because it will result in a lot of read/writes with no real effectiveness. Anyone knows of a way of detecting if a given drive is solid-state? ...