delphi-2010

How do I implement an Delphi coded "ICollection" from a C# .NET collection defined within a 3rd Party Open API Tool.

How do I implement an Delphi coded "ICollection" from a C# .NET collection defined within a 3rd Party Open API Tool. I have a Laserfiche API toolkit where I am calling the code to return a collection of search hits. --- This is the process to call it from VB# --- search.BeginSearch(True) set results = search.GetSearchHits() ' retrie...

Anyone having problems with Delphi-2010 and Norton Internet Security 2010 ?

I just spend the good part of the afternoon trying to find out why some projects, when compiled and run from within the Delphi-2010 IDE produced a 'Security Risk - A program is behaving suspiciously on your computer' warning every time I compiled it. In the end it turned out to be the following: - if version information is turned on 'In...

Delphi 2010: anyone got the right settings for the formatter not to fold anonymous methods?

With the default settings, the Delphi 2010 code formatter folds anonymous methods on one line. Is there anyone who has found settings to circumvent this? Original code: procedure TUnit.AppendFinalization(const StringBuilder: TStringBuilder); begin AppendMemberResults(StringBuilder, function(Member: TGeneratableInUnit): IStringLi...

How to show a semi-transparent dimmed panel/image in Delphi?

I wish to get a TPanel or TImage to show a dimmed background (with a veil), anyone knows how to accomplish this in Delphi (2010)? I would prefer not to use a component if possible, just raw code. The idea is that when showing a new form the parent one visually shows the user it's "disabled". Something like this: ...

Right to left TRibbon

How can I have the pages in TRibbon right aligned? bidiModeRightToLeft has no effect ...

Java-like collections in Delphi

Hi, all! Is there a kind of implementation (at least partial) of java collections (Set, List, Map, Collection ...) for Delphi 2010? I need it for make porting code from java to Delphi a little bit easier. ...

Delphi 2010: Where is DockForm.pas?

I have to upgrade an old Delphi3 project to Delphi2010. It uses a unit named DockForm, but I cannot find it anywhere in Delphi2010. It is present in the old Delphi3 install CD as uDockForm, but it should be also found in D2010, because own D2010 source files use it (for example, \Embarcadero\RAD Studio\7.0\source\ToolsAPI\ToolsApi.pas)...

Can you recover from a "Resource 1 not found"? in Delphi 2010

A fairly complex project was muddling along with lots of work done last night when I decided to turn in. But thinking about adding some gestures got me up after three hours of sleep and I went at the code again, which was a mistake. I added the gesture manager and then sleepily hit the F1 key to look up the help on gestures. Coming back ...

Why does OnMouseMove fire repeatedly when the mouse is not moving in D2010?

I'm porting a Delphi 5 app to D2010, and I've got a bit of a problem. On one form is a TImage component with an OnMouseMove event that's supposed to update a label whenever the mouse is moved over the image. This worked just fine in the original app, but now the OnMouseMove event fires constantly whenever the mouse is over the image, w...

SOAP inconsistency? Delphi 2010 (Win32) Server and .NET Client swapping 'out-parameter' and 'result'.

Could someone please shed some light on this behaviour? It looks like Delphi SOAP sets the function result as the last argument, but WSDL.exe reads the first argument to be the function result. I have the following method in a Delphi SOAP service, where the result string is used for basic error handling: function LoadCustomer(Customer...

Implementation of vector class in Delphi?

How would you go about creating a vector class in Delphi? I would prefer to put all math related stuff into a DLL. Should I use a record or a class implementing an interface? Pros of record approach: Fast and lightweight Value type Operator overloading Cons of record approach: Implementation cannot be hidden in DLL (no inheritance...

Sporadic DFM corruption of TListView.Items.ItemData

I have a custom TListView descendant that I originally created in D2007 and am now using in D2010. The control worked fine in D2007 without a problem, but in D2010 I'm experiencing sporadic but frequent instances in which the DFM cannot be loaded by the executable and throws an EReadError with message: 'Error reading lvPremiums.Items.I...

In what order should Delphi and MS dev tools be installed?

I just got a new laptop with Windows 7 (32-bit) and I have to install the following things: SQL Server 2005 (Dev edition) SQL Server 2008 (Dev edition) Visual Studio 2008 Prof. Delphi 2007 Delphi 2010 In addition I need the usual suspects such as Office 2007 etc. I was thinking of doing it in the order listed above but would like to...

Function Null for variant in Delphi 2010

where is this funtion in Delphi 2010 function Null: Variant; begin _VarNull(TVarData(Result)); end; in Delphi 6 it was in Variants ...

Is Delphi Prism a new version of Delphi .net ?

First of all (before this question get down voted): I am a developer developing 99,99% of my programs using Delphi targeting Win32 (developing in Delphi 7 still, very slowly migrating to Delphi 2010). When Delphi 2006 or 2007 (can't remember which version at the moment) came out I bought the RAD Studio edition to be able to start develo...

widestring compatibility problem in Delphi

In a dll build with Delphi 2006 Foo(aPath: widestring); begin _rootPath := aPath; end; In an executable built with Delphi 2010 _Foo := GetProcAddress(FooModule,’Foo’); _Foo(‘123456’); Stepping into the dll, aPath = '123'. In fact any string I pass gets cut exactly in half. 1.) Why is my literal being halved? 2.) How do I fix it...

Separate dbx connection to a thread

I made a small app that connects to a mysql db using dbx. It works ok with my local mysql server, but it's supposed to work with a remote server. Connecting to the remote server takes a few seconds, which freezes the app. So my question is, how can I put the connection code in a different thread? I'll have to pass that connection to t...

How do I Import TypeLib as safecall vs stdcall in Delphi 2010

Delphi versions before 2010 had an option in the Delphi Environment that one could set: "All v-table interfaces". This would change the calling convention when importing type libraries. In 2010, the option is gone. How do I import a type library with the safecall calling convention? I'm hoping maybe there is a more granular level of ...

Object Inspector Rad Studio

is it possible to put methods in the properties of objects in the object inspector in rad studio 2010 (or an older version)? if so how? ...

TWAIN scanning components for Delphi.

I need to add TWAIN scanning to an Delphi application and am having trouble locating an off-the-shelf component to do so. I downloaded TDelphiTwain but, when used in D2010 on Windows Vista, it does not appear to recognize any Twain sources on my system. I also tried the trial version of Twain Toolkit for Delphi from MCM which has the a...