delphi

Delphi Project Needing runtime Packages, even with runtime Packages off.

My Delphi7 project will not run on my clients computer if i don't have a few of the runtime packages in the path. eg rtl70.bpl I have Build with runtime packages unticked, so shouldn't they be complied into the exe? Edit: the Project uses Jedi Packages (TJvPlugin) and running the program with out any plugin installed works fine. As Soo...

Any complete library for Jabber in Delphi?

Hi there! I'm looking for for a Jabber library for Delphi, I can see some COM based jabber components. But I'm looking for a real VCL library. Somebody knows one? ...

How to avoid rounding problems when comparing currency values in Delphi?

AFAIK, Currency type in Delphi Win32 depends on the processor floating point precision. Because of this I'm having rounding problems when comparing two Currency values, returning different results depending on the machine. For now I'm using the SameValue function passing a Epsilon parameter = 0.009, because I only need 2 decimal digits ...

Execute action for automatically unchecked button in Delphi

I have one action I want to perform when a TSpeedButton is pressed and another I want to perform when the same button is "unpressed". I know there's no onunpress event, but is there any easy way for me to get an action to execute when a different button is pressed? procedure ActionName.ActionNameExecute(Sender: TObject); begin Previ...

Delphi 7 compile error - “Duplicate resource(s)” between .res and .dfm

I got a very similar error to the one below: http://stackoverflow.com/questions/97800/how-can-i-fix-this-delphi-7-compile-error-duplicate-resources However, the error I got is this: [Error] WARNING. Duplicate resource(s): [Error] Type 10 (RCDATA), ID TFMMAINTQUOTE: [Error] File P:\[PATH SNIPPED]\Manufacturing.RES resource ...

Delphi 7 exception not caught

I have some really complicated legacy code I've been working on that crashes when collecting big chunks of data. I've been unable to find the exact reason for the crashes and am trying different ways to solve it or at least recover nicely. The last thing I did was enclose the crashing code in a try ... except cleanup(); end; just ...

Importing Delphi Web Services into Java

I have a web server built in Delphi, and I'm trying to consume its web services on Java (I'm using Eclipse IDE) by creating a Web Service Client through the Eclipse wizard. The Web Services Explorer recognice the WSDL file, but when trying to create the client, the wizard says there's an "unexpected attribute" and does not create any fil...

Is there a FOSS batch compiling solution for Delphi that takes version as an input parameter?

Is there a FOSS batch compiling solution for Delphi that takes version as an input parameter? I am using Delphi 7 and this remains the most tedious operation. Are there any other solutions, workarounds to make this easy. ...

Event on Item Marked as Read in Outlook - Delphi COM Add-in

I have a Delphi COM Add-in for Outlook (2000-2007) and am trying to find a way to register an event when an MailItem in Outlook is marked as read. I want to add an additional property to the item as/just after it is marked as read. Does anyone have any idea how to do this using the Outlook Object Model? I am also using Add-In-Express ...

Delphi TThread.CurrentThread and EAccessViolation - Is This a Bug or My Incompetence..?

In Delphi 2009 I'm finding that any time I use TThread.CurrentThread in an application, I'll get an error message like the following when the application closes: Exception EAccessViolation in module ntdll.dll at 0003DBBA. Access violation at address 7799DBBA in module 'ntdll.dll'. Write of address 00000014. Unless it's just my machin...

Is there any way to get code folding in Delphi 7?

I know this is a long shot - but is there any way at all to get code folding into Delphi 7? I'm working on some .. "suboptimal" .. code. Sometimes I really need to fold bits away to grok a stupid-long procedure. Currently I'm pasting code into Notepad++, which works, but it would be nice to have it in the IDE. ...

How do I use or resolve issues with visual form inheritance in Delphi?

I've been working on a project in Delphi 7 where I wanted to have forms inherit components from other forms. I was able to get this working, but came across the following issues (and I'm going to post the solutions to hopefully help others in the future): In the .pas file of a form, I would change the form to inherit from some other fo...

Is there a way to see if a character is using 1 or 2 bytes in Delphi 2009?

Hi, Delphi 2009 has changed its string type to use 2 bytes to represent a character, which allows support for unicode char sets. Now when you get sizeof(string) you get length(String) * sizeof(char) . Sizeof(char) currently being 2. What I am interested in is whether anyone knows of a way which on a character by character basis it ...

Error from Delphi ActiveX Control: Exception EOSError - A call to an OS function failed

I use an activex component in my C# program that was created with Delphi. It works fine a lot of the time, but occasionally (sometimes frequently!) the component crashes with this exception: Exception EOSError (A call to an OS function failed)(0) which leaves the control in a somewhat unusable state until the program is restarted....

How can I set and restore FPU CTRL registers?

I can reset FPU's CTRL registers with this: http://support.microsoft.com/kb/326219 But how can I save current registers, and restore them later? It's from .net code.. What I'm doing, is from Delphi calling an .net dll as an COM module. Checking the CTRL registers in delphi yield one value, checking with controlfp in the .net code giv...

Avoiding Dialog Boilerplate in Delphi and /or C++

I often need to design a dialog in Delphi/C++Builder that allows various properties of an object to be modified, and the code to use it typically looks like this. Dialog.Edit1.Text := MyObject.Username; Dialog.Edit2.Text := MyObject.Password; // ... many more of the same if (Dialog.ShowModal = mrOk) begin MyObject.Username := Dialog...

Proper way to connect ODBC data source with Delphi 2006+ ?

Hi, What's proper way to connect ODBC datasources and execute some SQL statements? TQuery and other BDE components can do it, but if I understood correctly they are now deprecated? ...

TListBox Drag and Drop problems with MultiSelect enabled

I have a TListBox with multiselect and ExtendedSelect both set to true. I need to be able to drag multiple items in the list box to re-arrange them. My problem is what happens when the user clicks on an item that is already selected without holding down the CTRL or SHIFT key. Case 1: DragMode is set to dmManual The selection is cleared...

Testing Delphi DLL crashes VB6 IDE

I've had my first go at writing a DLL in Delphi. So far so good. By using a typelib I've been able to pass Widestrings to and from the DLL without difficulty. What's curious at the moment is that I'm using VB6 as the testbed, and every time I run a test within the IDE, the program runs and then the IDE process suddenly disappears from m...

Delphi for PHP

I just came across Delphi for PHP and my immediate response was "oh, no", but I think maybe I was being too hasty. Has anyone tried it? What do you think? ...