delphi

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...

Paper form VCL Controls for Delphi

I need to develop an application for paper based data entry forms. Are there any VCL based controls that support this? I need something that: Includes some type of form designer for creating the form definition Supports updating of fields on the form as other fields are updated. For example the field has a + b = c. As the user ente...

How do I keep Vista from killing my program on exceptions?

It used to be that if an exception got raised and propagated far enough up the call stack, Application's main loop would handle it and give you a dialog box. That behavior seems to be broken under Windows Vista. If any exception reaches that level, Vista steps in and says the program "has stopped working," when it used to be perfectly...

Detect the number of unique values in an array

I am looking for an efficient way to detect the number of unique values in an array. My current approach: Quicksort array of integers Then run a loop to compare elements. In code: yearHolder := ''; for I := 0 to High(yearArray) do begin currYear := yearArray[i]; if (yearHolder <> currYear) then begin yea...

How to delete files matching pattern within a directory

That is, delete all files matching pattern within a given directory Example, Delete all *.jpg files within DirectoryName ...

How do I make the TAB key close a TComboBox without losing the current position?

I have a TComboBox on a form. Its Style property is set to csDropDownList. If I open the dropdown and select an option with my mouse or keyboard and hit ENTER, the dropdown box closes and the ItemIndex property is changed before the KeyPress event handler is fired. If I hit TAB, the dropdown doesn't disappear until after the KeyPress ...

How to tell if Windows Taskbar's "autohide" is enabled?

How can I tell via a Delphi program if the Windows Explorer Taskbar is set to Autohide? ...

Any way to change colour of the Code Insight red 'underline' in Delphi2007 IDE?

I hope the question says it all, really. I use the old Turbo Pascal type colours (navy blue background and white, yellow text etc) in all my Delphi IDEs, including D2007. I'm sufficiently colourblind that I can't really make out the red squiggly lines in my code - but I find the feature really useful when I do notice them. I've tried sw...

Dictionary Component or source code that can check in multiple languges

We are developing an application in which we need to implement spell checking for Indic languages that use ANSI fonts (not UNICODE) I am looking for a Dictionary Component or Source Code that will allow: To maintain separate dictionaries like for example Legal, commercial, etc. Support more than one language If possible to allow devel...

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...

How can I perform a 'dry run' of MSBUILD for a Delphi project?

if I launch the RAD Studio command prompt and run msbuild /t:Rebuild in the project directory, msbuild will show the full command line to invoke dcc32, including all path settings. (see http://stackoverflow.com/questions/970994) If I only want to capture this msbuild console output in a file, and do not need the compiler execution, is...

How do you set a custom application as default email client in Windows in code

I would like to set an in house email client written in Delphi as the default email client for mailto: using code. Is it possible, and if so, how can it be done? ...

Old Borland Chess WebService help please.

I'm looking for a viable link to the 'old' borland chess server so i can connect my chessboard client? Also, i do have the client chessboard, the chessCGIserver and the chessbook (intelligence) - i would like to know how to setup the web server. Note: Old WSDL (chessWebService) link was first: http://wwwapp1.borland.com/webchess/ChessCG...

How to compile RES file from commandline (Delphi 7)

I never worked with Delphi before, so maybe the question looks a simple minded, But I need to change FileVersion in RES resource file parameter from command line... Many thanks. ...

C++ Builder vs Delphi vs MFC

I am learning MFC and find it not that easy to use. I've heard a lot about Delphi . researching on Delphi lead me to C++ Builder. does C++ Builder offer a serious and good alternative to C++/MFC ? is C++ Builder better than MFC ? is C++ Builder better than Delphi ? (I've heard many goood things about Delphi) can any one give me a comp...

Accidentally created a virus?

I've seen it happen reasonably often: I write an application in Delphi and when I compile it, the virus-scanner tells me that I've created a virus and then immediately deletes the executable again. It's annoying but reasonable easy to fix by doing a full rebuild, deleting the *.dcu files first and sometimes by simply waiting. It happens...

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. ...

Installing multiple library versions in Delphi / C++Builder

How I can install multiple versions of a library in Delphi or C++Builder? For example, I might want to be able to develop the next version of our app using the current versions of JCL and JVCL while still being able to compile the release version of our app using whatever version of JCL and JVCL were tested for that release. Using more...

How are the basic Delphi types related to each other?

Delphi has long supported a few basic numeric types and I was wondering how they are related to each other. In Delphi 2007 I found these declarations (some are conflicting, some are mere aliasses) : Types.pas: DWORD = LongWord; Largeint = Int64; getmem.inc: DWORD = Integer; Windows.pas: DWORD = Types.DWORD; SHORT = Smallint; UIN...

how to use system.xml.dll in delphi

I downloaded the system.xml.dll, then added it to my Delphi code as following: uses system.xml; etc... When I try to compile the project, the following message appears: file not found system.xml.dcu. Can anyone guide me how to solve this problem? Thanks. ...