delphi

Delphi 2009 ShellTreeView/ShellListView Fix

When a Delphi 2009 project is closed with ShellTreeView/ShellListView on the mainform in the IDE Index out of bounds(0) exceptions are generated. Is there a fix for ShellTreeView/ShellListView so the exceptions can be eliminated? ...

Adding multiple function calls to a case of in delphi?

case i of 0..99 : Function-call('bobo') ; 100..209 : function-smell('Hobo'); 210..300 : function-yikes('argh'); end; But what if I wanted 210..300 to call both function yikes and function smell? Can't figure out how thanks. ...

Coverting a TMyQuery dataset to TClientDataSet in Delphi

Hi I make use of the Mydac components by devart (corelab) to access MySql from Delphi (2006) Very often I need to work with data in a TClientDataSet What is the best way to convert the dataset of a TMyQuery to TClientDataSet Currently I am using var MyQuery : TMyQuery; Dsp : TDataSetProvider; Cds : TClientDataS...

Delphi IDE - CodeRush visual "connectors" alternative

I used to work in Delphi 6, and got very used to having CodeRush's various helpful IDE additions. Many are now in the IDE itself, or I've managed to replace with something else, but the one feature I REGULARLY find myself wishing I had in Delphi 2007 still, is the ability CodeRush had that added little "connecting lines" between compone...

How can I create a windows service in Delphi?

I have been assigned an assignment to create such a service in delphi which will track the logged in user activity on the computer. For this i have to I want my service to be run in the background and should store the name of every ACTIVE window in particular time events. Learn how to create windows service in delphi How should I get...

Detect if a application is not in use

How can I detect if an application is not used for more than x minutes in DELPHI ...

What is for the Index option in TRemotable derivated classes?

When WSDL importer wizard generates the interfaces, all properties have the Index option, but reading the code and the InvokeRegistry unit, I can't found what is that for, anyone know if it is really necessary? Like this Login = class(TRemotable) private [...] published property User: string Index (IS_OPTN) read GetUser ...

Delphi: Limiting TCP connections

Hello. I'm using the TServerSocket component in my Delphi application. I would like to limit client connections, let's say to one thousand. Unfortunately i don't know how to do that. The component does not provide any properties like 'MaxConnections' or any other like this one. I create new server threads (TServerClientThread) using th...

Delphi Syntax for TextMate

I exchanged emails with Marc-André Cournoyer of RefactorMyCode.com about supporting Delphi on his site. Since his site uses Ruby's UltraViolet to do syntax highlighting, and it uses TextMate syntaxes, he needs a Delphi syntax for TextMate. Turns out it has a Pascal syntax already, so it is 90% of the way there. Does anyone know where ...

LINQ in win32 DELPHI

Is it possible to use LINQ in win32 DELPHI applications ...

Delphi code generation

I need to speed up my coding, too much work, so I need be able to generate code. Any tools, any ideas? ...

Requirements for JSON Parser

I'm thinking about implementing JSON parser for Delphi. What should a good JSON parser do? Any ideas for requirements? I believe it should at least output and process JSON... Looking at XML parsers, should it be more DOM or SAX-like? ...

Is there any way to get all the controls on a container control?

I've got a form with a bunch of controls on it, and I wanted to iterate through all the controls on a certain panel and enable/disable them. I tried this: var component: TComponent; begin for component in myPanel do (component as TControl).Enabled := Value; end; But that did nothing. Turns out all components are in the form's ...

How to automatically free classes/objects?

What techniques exist to automatically free objects in delphi applications? ...

What is the best tool to detect memory leaks in Delphi

What is the best tool to detect memory leaks. Both free and not Free. Thanks ...

EXE, Resource and Code Reduction

How can I reduce resources inside my application? I have tried a number of tricks I have reduce and rewritten code, reduce line number, Reduce comments, Compressed the final EXE, but this is not the way I want to go, Improve the variable type cast, Remove ICONs,BMP,JPG, from inside the application I need my applications to be as small as...

How do I go about diagnosing memory corruption errors occurring in a COM-DLL after porting it from Delphi 2007 to Delphi 2009?

I have just ported several of our home-made Outlook COM-addins from Delphi 2007 to Delphi 2009 and am now experiencing some really weird errors (before you ask: none of which appear to have any obvious relationship to string-handling), for example modal dialogs that hang Outlook when one tries to invoke them a second time (the first time...

Can I Use a .NET DLL in "Delphi 2007 for Win32"?

Is it possible to use a .NET DLL in Delphi 2007 for Win32? I've tried to import the DLL in the same way I've done for an ActiveX component, but it doesn't appear to work (Component Menu -> Import Component -> Import .NET Assembly. Is it possible and if so what are the steps? ...

Which simple future-proof Delphi serial comms code to use?

I've been a fan of Turbopower Async Pro for years, now taken up on SourceForge and it works very well. However, it's complex and I've never really made use of its features other than the port component. I'm updating my code for D2009 etc and am tempted to move to something simpler since I have my own wrapper around it. There are lots of ...

Why sometimes I get an "Invalid transaction object" exception?

Is there something wrong with this code? Sometimes I get an unhandled "Invalid transaction object" exception in it: procedure BlaBla; var TD: TDBXTransaction; begin TD := SQLConnection.BeginTransaction; try SQLConnection.ExecuteDirect('some sql command'); SQLConnection.ExecuteDirect('some sql command'); SQLConnection.C...