delphi

Outlook ole error 800A01A8 when closing it with more than 10 outlook-explorer windows

I have written an Outlook plugin in Delphi 2009 that opens a database connection and does some tasks to accompany my main application. When Outlook is now closed it raises an 800A01A8 ole error, but only if you had about 10 outlook-explorer windows open. Another important point is that that only happens occasionally when you use File\Exi...

Custom components - how to manage?

I've made a couple of programs which I release as freeware on my webpage. One of these programs uses TSpinEdit for some number input. It works quite well, so I haven't really had any reason to use anything else. However, yesterday, a user told me he didn't like how small the buttons were. I can't really disagree, because, well, they are...

TSQLConnection to a user chosen DSN at runtime

Hi, I want to use dbExpress and a TSQLConnection object to allow the user of my application to connect to any of their ODBC dsn and run a SQL query against it. I have it so the user can select a DSN, (by DSN i mean all the configured data sources listed in control panel - administrative tools - Data Sources (ODBC)), but once they have ...

Ole 800A03EC error when using TExcelWorkBook SaveAs method in Delphi 7

I am trying to open excel 2003 workbook and save it as something else, for example excel 95. I use the following code: XLSApp:=TExcelApplication.Create(Self); XLSApp.Workbooks.Open(SomeFileName,NULL,false,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,defaultlcid); XLSWB:=TExcelWorkbook.Create(XLSApp); XLSWB.ConnectTo(XLSAp...

Delphi Enterprise: how can I apply the Visitor Pattern without circular references?

With Delphi 2009 Enterprise I created code for the GoF Visitor Pattern in the model view, and separated the code in two units: one for the domain model classes, one for the visitor (because I might need other units for different visitor implementations, everything in one unit? 'Big ball of mud' ahead!). unit VisitorUnit; interface use...

How can you change the font color of a theme-enabled control?

Yes, this is again this question: How can I change the font color of a TCheckBox (or any handled control) with Delphi7->Delphi2007 on a themes enabled application? After reading a lot on the internet and on this site, I found 4 kinds of answer: and Most populare (even from QC): You can't, it's designed like that by Microsoft. Create...

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

Call a TDataModule method in TThread.Execute

Hello people, In general, is it possible in a TThread.Execute procedure to call a TDataModule method, in which there is no visual activity involved? Thanks to all, Massimo. ...

C# equivalent for Delphi's in

Hi, What is the equivalent in C# for Delphi's in syntax, like: if (iIntVar in [2,96]) then begin //some code end; Thanks ...

Problem with "unwanted" exception dialogs in Delphi

I've problem with exception dialogs: I'm using RemObjects SDK for Client/Server -application. When there's connection problem, the client starts throwing "simple" exceptions dialogs, just text and a button. When I'm running the application on my development machine the exceptions dialogs are not shown (as expected). The text on the dialo...

Tamperproof table

I'm designing a table that will be used to store information on which customers will be charged. The problem is the database could be on the customers servers. I was thinking of adding a second table containing a hash of the first, so that the software using the database can update the database and the hash, but the customers can't edit ...

Why do I get compiler errors using Delphi 2010's built-in Indy distribution?

Hello. I have just installed Delphi 2010 and got some troubles with idHTTP component. If I drop it on form and try to compile, Delphi says that: [DCC Error] IdCookieManager.pas(118): E2010 Incompatible types: 'TIdCookieList' and 'TIdCookieDomainList' [DCC Error] IdCookieManager.pas(172): E2003 Undeclared identifier: 'IsVali...

How to encapsulate different classes within one class mantaining their unique methods? (multiple inheritance in delphi?)

I'm currently rewriting a free educational digital circuit simulator to add inertiality to its features. My problem is how to dispatch events to original classes adding a pre-elaboration to them. I have something like this: TC1 = class ID: integer; Connections : array [integer] of Pin; function Func1; virtual; function FuncN; en...

Web Payment Idea for mysql 3.23 and asp.net

My company has an old windows program. Written in turbo delphi mysql-max-3.23.53-win with zeos components. We need an web payment system integration for this. I have tried with visual studio 2008 and mysql connector, but the connector gives error to connect this database. we can not upgrade the mysql version because there is a lot of cod...

How do I catch a VK_TAB key in my TEdit control and not let it lose the focus?

In my TEdit field I have text in the form <number1>..<number2>. My idea is: When a user enters the control using TAB from another control, number1 gets selected. When my TEdit control has a focus and user presses TAB again, I want the number2 to get selected and number1 to be deselected. And if current caret position is at the place ...

How to extract a set of records with a specific field from a Delphi in-memory data table.

I've an in-memory table that I've populated with data from a custom-format file. I'd like to use this as a repository for the data without duplicating it elsewhere. Each record has a special tag field which can be 1..30. I'd like to create up to 30 virtual 'tables' that I can supply to DBGrid's or DBChart's that look like they each conta...

How can I hide a window while keeping it on the taskbar and the Alt+Tab list?

In Delphi I can do something like: var hWin : HWnd; hWin := GetForegroundWindow; ShowWindow(hWin, SW_HIDE); and hide the window of the topmost application. The problem is that this also hides the application from the task bar and the alt-tab window. Is there any way to only hide the window without hiding the app from the taskba...

How to debug a Custom Property Editor in Delphi 6 (Pro)?

How can I set breakpoints and trace through a Custom Property Editor I wrote for one of my VCL derived components (Component Palette member)? The problem of course is that I want to debug code that is running in a compiled BPL while the IDE is active and is not running an active application. Setting breakpoints in the BPL source file d...

ParentWindow in a DLL

I'm trying to assign a ParentWindow, to a control created in a dll. The control is an editor, I need to process a text file, but this control requires a ParentWindow. How can I solve this problem, if I create this control in a dll? I'm using Delphi 5. ...

Adding Properties to a Frame descendant

I'm pretty new to Delphi even though I used to use it many years ago (ver 2) so the Frame concept is something new to me. I understand that they work simular to Forms in that that they have an associated DFM file and are an easy way to create components (without actually creating a component, I do understand the difference between a comp...