delphi-2010

How to Export Code Formatter Settings of Delphi 2010?

I searched the registry. I'd expect the settings in HKEY_CURRENT_USER\Software\CodeGear\BDS\7.0 but didn't find anything. I want to share the settings with my team. Where does Embarcadero save these? ...

What are the MSBuild project level properties for Delphi?

The Delphi documentation for MSBuild says /property:name=value sets or overrides project-level properties, where name is the property name and value is the property value. Use a semicolon or a comma to separate multiple properties, or specify each property separately. /p is also acceptable. For example: /property:Wa...

Failed to extract files from Delphi resource file

I have been using FindResource, LoadResource and LockResource to access resources in a res file. I have a wave file which I want extract and play through my Delphi application. I have done it without extraction, but it's not the thing I want to do. I want to first extract the wave file. Can anyone point me to the right solution? ...

Delphi DB Aware visual attractive tag component available?

I need to implement a tag system for video program and before I build something myself, is there an attractive drag-n-drop tag component that will filter a table for me? ...

How to use Delphi 2010's new WIC capability on Canon files?

Does anyone know of some sample code that shows how Delphi 2010 can read RAW files using its new COM interface to WIC? I want to read Canon RAW images and then access specific pixels... ...

C# Style XML Comments in Delphi 2010

Hi, does Delphi 2010 have C# Style XML comments that show up when hovering over the method call? /// <summary> /// My comment here /// </summary> ...

What's the syntax for including methods in a variant record?

I have the following record definition E3Vector3T = packed record public x: E3FloatT; y: E3FloatT; z: E3FloatT; function length: E3FloatT; function normalize: E3Vector3T; function crossProduct( const aVector: E3Vector3T ): E3Vector3T; class operator add( const aVector1, aVector2: E3Vector3...

Anyone know how to use TValue.AsType<TNotifyEvent> properly?

I'm trying to use RTTI to add an event handler to a control, that may already have an event handler set. The code looks something like this: var prop: TRttiProperty; val: TValue; begin prop := FContext.GetType(MyControl.ClassInfo).GetProperty('OnChange'); val := prop.GetValue(MyControl); FOldOnChange := val.AsType<TNotifyEvent...

Cross-reference between delphi records

Let's say I have a record TQuaternion and a record TVector. Quaternions have some methods with TVector parameters. On the other hand, TVector supports some operations that have TQuaternion parameters. Knowing that Delphi (Win32) does not allow for forward record declarations, how do I solve this elegantly? Using classes is not really ...

TArray<Byte> VS TBytes VS PByteArray

Those 3 types are very similar... TArray is the generic version of TBytes. Both can be casted to PByteArray and used as buffer for calls to Windows API. (with the same restrictions as string to Pchar). What I would like to know: Is this behavior "by design" or "By Implementation". Or more specifically, could it break in future release?...

Synapse and string problems with HTTPSend in Delphi 2010

I have been trying to get to the bottom of this problem off and on for the past 2 days and I'm really stuck. Hopefully some smart folks can help me out. The issue is that I have a function that I call in a thread that downloads a file (using Synapse libraries) from a website that is passed to it. However, I've found that every once in a...

How can a component at designtime determine the project directory

Hello, I write a component which should store some information relative to the project directory. Every time a property of my component is changed it should write a file. So how can a component determine the current project directory at design time. Thanks in advance EDIT: I want to generate a delphi source file every time a property...

Why does the D2010 debugger make some things much slower?

I've got a special combo box with a very long list of items (a few thousand) that has to be calculated when you open it. When I was testing something, I was horrified to find that it took about a minute to open. So I hooked the program (same build, same options) up to Sampling Profiler to see what was taking so long, and it only took a...

Delphi 2009 - Strip non alpha numeric from string

I've got the following code, and need to strip all non alpha numeric characters. It's not working in delphi 2009 ` unit Unit2; //Used information from // http://stackoverflow.com/questions/574603/what-is-the-fastest-way-of-stripping-non-alphanumeric-characters-from-a-string-in interface uses Windows, Messages, SysUtils, Variants, C...

Delphi 2010 variant to unicode problem

I am working on a DLL in Delphi 2010. It exports a procedure that receives an array of variants. I want to be able to take one of these variants, and convert it into a string, but I keep getting ????? I cannot change the input variable - it HAS to be an array of variants. The host app that calls the DLL cannot be changed. It is written ...

Looking for a good Delphi unicode string library

Any suggestion for a good unicode string library for Delphi 2010? Such thing as class that would contain a collection of independent functions, basically an encapsulation of functions that manipulate strings (ex: Trimlike, Character removal, Positional, Sub-string, Compare, Informational, Case, Replacement, Manipulation functions etc. )....

Delphi 2010 Professional and remote database access

When looking for which version of Delphi 2010 to buy, we found the following limitation on the professional one: Delphi 2010 Professional is designed for developers building high-performance desktop GUI and touch-screen applications with (or without) embedded and local database persistence. What does this really mean? Doe...

How do I change the file extension for dependencies

I'm building a program that uses Delphi Packages (BPLs) as plugins, but I'd like to use a custom extension to show that the files have a specific purpose instead of just being BPLs. That works well enough until I end up with one package having a dependency on another. Then the compiler automatically creates the binary with the extensio...

How to make sure that Parameters have been updated in a Dataset Provider

In a Delphi app we have assigned a dataset provider with a TADOQuery, passing parameters to the Query. When the TADOQuery is refreshed with new parameter values these are not being passed to the Dataset Provider. This seemed to work ok in Delphi 5, but we are migrating our application to Delphi 2010 and it seems to have broken this l...

Converting an string to a enum type using TValue?

I want to convert an string to an enum type using TValue, I googled but I didn't find how to do that. type TEnumTest = (etFirst, etSecond); var D: TEnumTest; begin D := StrToENumTest('etFirst'); end; function StrToEnumTest(pStr:String):TEnumTest; var V: TValue; begin V := TValue.From<String>(pstr); Result := V.AsType<TE...