delphi-2009

creating a gif animated file in delphi 2009?

gif := TgifImage.Create; gif.Width := 100; gif.Height := 100; gif.AnimationSpeed := 500; gif.Animate := true; gif.add(image1.Picture.Bitmap); gif.add(image2.Picture.Bitmap); gif.add(image3.Picture.Bitmap); gif.SaveToFile('gif.gif'); This loops just once and the speed is not 500? How to make it loop and set the speed? ...

Delphi 2009: "XML document must have a top level element" error when using TIdHttpWebBrokerBridge

We have a app which uses HttpWebBrokerBridge, it works fine in Delphi2006 but when I recompile using Delphi2009 I get EDOMParserError exception with message "XML document must have a top level element". I don't have any clues as to what's causing this error. Any clues as to what I should do? Sandeep ...

How can I update a DataSnap server while clients are still connected?

We use stateful DataSnap servers for some business logic tasks and also to provide clientdataset data. If we have to update the server to modify a business rule, we copy the new version into a new empty folder and register it (depending on the Delphi version, just by launching or by running the TRegSvr utility). We can do this even whi...

Delphi 2009 Web Services "xml document must have a top level element"

A variety of delphi demos I've built today with Delphi 2009 (update 3/4 applied) all seem to result in the client of any localhost web service I try to consume returning an "xml document must have a top level element" error This includes, for example, even a demo as simple as http://blogs.embarcadero.com/pawelglowacki/2008/12/18/38624 ...

"Delphi Fundamentals" in Delphi 2009

Hello, Has anybody used/converted "Delphi Fundamentals" in Delphi 2009? - http://fundementals.sourceforge.net/ I'm using Dictionaries (cArrays.pas,cDictionaries.pas,cStrings.pas,cTypes.pas) in my project and now i have some troubles on upgrading code. I'll be highly obliged if anybody can convert the above mentioned units in Delphi 200...

Importing D7 DPR in Delphi 2009: "Invalid character in text content"

I'm trying to open old projects generated in Delphi 7 with Delphi 2009. On some projects, this causes the following error message from the IDE: "An invalid character was found in text content" The affected projects are working fine in the old IDE. How can I solve this? ...

Conditional compilation based on a compiler directive in Delphi 2009

Is there a way in Delphi 2009 to have a section of code conditionally compiled based on a compiler directive. Specifically, I'd like to have code in place that is only included if the range-check compiler directive is turned on. Something like this: {$ifdef RANGECHECKINGISON} [do range checking code here] {$endif} ...

Design Patterns for Delphi 2009

I'm looking for design patterns (GOF, but others would be welcome too) for Delphi 2009. There are some very good and classic articles about Design Patterns in Delphi: http://www.obsof.com/delphi_tips/pattern.html, by James Heyworth (1996) http://blogs.teamb.com/joannacarter/, by Joanna Carter (until 2004) Additionally, the newer Del...

Is QuickReports included with Delphi 2009

The title says it all, we are considering moving from Delphi 7 to Delphi 2009 and would like to know if QuickReports is still included in the package? ...

Is there a Delphi library which returns all effective source paths for a project?

For static code analysis tools, it is necessary to know all effective source paths for a given Delphi project, which are defined on project level and in the global IDE configuration. Is there a Delphi library which can collect this kind of project information? As far as I know, the registry settings for the Delphi IDE can be in differ...

Getting Vista Folder Paths

Why will this not compile in Delphi 2009? unit VistaFolders; interface uses Windows, ShellAPI, ShlObj; type KNOWNFOLDERID = TGuid; const FOLDERID_ProgramData: KNOWNFOLDERID = '{374DE290-123F-4565-9164-39C4925E467B}'; // downloads folder var SHGetKnownFolderPathFunc: function( const rfid: KNOWNFOLDERID; dwFlags: DWORD;...

Setting Label and StaticText Color property problem - Delphi 2009

When I set the Label's color e.g. on value clRed, the red on it only blink for a while. The color property still has clRed value, but in fact it has default clBtnFace color. Screenshot discribes the problem better. ...

Copy const array to dynamic array in Delphi

I have a fixed constant array constAry1: array [1..10] of byte = (1,2,3,4,5,6,7,8,9,10); and a dynamic array dynAry1: array of byte; What is the easiest way to copy the values from constAry1 to dynAry1? Does it change if you have a const array of arrays (multidimensional)? constArys: array [1..10] of array [1..10] of byte = . ....

Generic Linked List for Delphi 2009

I was looking in Generics.Collections and noticed there was no linked list. Sure they are simple to make, but I thought it was odd there was not one (or I just missed it). Are linked lists just outdated when compared to new modern data structures, or is there a need for a general generic linked list? Does anyone know of one? ...

[Delphi 2009] Debugger displays useless info on user breaks

Hi all, It's a silly point, but I haven't been able to find the answer by myself : In delphi 2009, when I hit the "pause" button ("Suspend program execution") while debugging, the IDE pops the CPU window, and shows me the execution point and stack of the thread which actually stopped the execution, instead of the main thread - which is...

Robust unidirectional messages with Indy

I have a client application that should send notify messages to an optional server application. The client should not be influenced by whether the server appliction exists or not. It should try to connect to the server application and send the notify message and in case of errors it should just silently ignore all errors and continue wor...

How do I display a formatted (colour, style etc) log in Delphi?

I need to display a formatted log in Delphi 2009. The formatting does not have to implement all the features of say html, but a small subset e.g. colour, font style etc. Currently I am using a TRichEdit and my own proprietry tags e.g. this is blue. It is pretty convoluted to get this to work with a TRichEdit as there is no direct access...

Invalid pointer for Delphi 2009 Com dll project

I am upgrading from Delphi 7 on Windows XP to Delphi 2009 on Windows vista and I get invalid pointer operation after successfully loading a delphi dll project in com dll preject. Debuging the problem happen in Aftercontruction of by object that call the loadlibrary. please advise. ...

Transition to Unicode for an application that handles text files

My Win32 Delphi app analyzes text files produced by other applications that do not support Unicode. Thus, my apps needs to read and write ansi strings, but I would like to provide a better-localized user experience through use of Unicode in GUI. The app does some pretty heavy character-by-character analysis of string in objects descend...

Most Efficient Unicode Hash Function for Delphi 2009

I am in need of the fastest hash function possible in Delphi 2009 that will create hashed values from a Unicode string that will distribute fairly randomly into buckets. I originally started with Gabr's HashOf function from GpStringHash: function HashOf(const key: string): cardinal; asm xor edx,edx { result := 0 } and eax,eax ...