delphi

How to check if a Delphi class is declared abstract?

Is it possible in Delphi to use RTTI (or something else) to check if a class is declared as abstract? Something like: TMyAbstractClass = class abstract(TObject) // ... end; ... if IsAbstract(TMyAbstractClass.ClassInfo) then ShowMessage('Yeah') else ShowMessage('Computer says no...'); ...

Freeform Reporting tool

I am looking for free form reporting tool. Free/open source is preferred. It should work without a data source and one should be able to print at any place on a page. I need this because I am using an age old but very fast semi RDBMS which does not support concept of Data Set, Data Source, etc. that as required by all reporting engin...

Delphi 6 / Zeos / SQlite

Hello, I am writing a program that uses master / detail I am new to Zeos and SQlite I already have the conection, two tables, etc. I have an autoincrement primary key field on the master table I want to update. What should I do to automatically retrieve the primary key field value (and the record pointer stays on the record I have just...

How do I get Delphi 2009s (Refactor) Extract Interface to work?

I am trying to use Delphi 2009's refactoring to extract an interface from a class. The class looks something like this: Type TMyClass = class(TObject) private FPrivateVar: Integer; public procedure MyPublicProc(Value: String); function MyPublicFunc(Value: String): String; end; If I place the cursor in the public s...

SQLite or Blackfish - what should I use with a delphi Application ?

I am thinking about using SQLite It is a self-contained, server less, zero-configuration, transactional SQL database engine and is open source. Will I gain anything by using Blackfish instead of SQLight ? ...

Delphi: TOleControl puts ActiveControl in wrong state?

In Mike Lischke's now defunct Virtual Treeview, there was workaround code added to fix a bug when using a TWebBrowser control on the same form. The problem was that if the user tries to interact with a TOleControl (from which TWebBrowser descends), the first mouse click is eaten. They have to then click again to give the control focus....

How to connect to Oracle 10g from remote client?

Using the standard Delphi dbexpress dbexpora.dll + oci.dll (10g) (the oracle instantclient is installed). When directly on the Oracle Database box we can run dbexpress apps just fine. The local dbxconnections.ini alias used in that case simply specifies our DB service name ORCL as the "database" parameter. We are trying to connect to t...

Delphi custom message handlers

When a user double-clicks a dbgrid, I show a non-modal form. When they close that form, I want to refresh the grid. To accomplish that, I have tried the following: 1 - Define a custom message constant: const WM_REFRESH_MSG = WM_USER + 1; //defined in a globally available unit 2 - In the OnClose event of my non-modal form, I have...

What is the standard method for a website to communicate with a win32 executable?

I have some delphi code which, given a list of items, calculates the total price taking into account any special deals that might apply. This code is non-trivial to rewrite in another language. How should I set it up to communicate with a website running on the same server? The website will need to ask it for a price every time the use...

Which variables are initialized when in Delphi?

So I always heard that class fields (heap based) were initialized, but stack based variables were not. I also heard that record members (also being stack based) were also not initialized. The compiler warns that local variables are not initialized ([DCC Warning] W1036 Variable 'x' might not have been initialized), but does not warn for...

Should I change my Image Base?

In Delphi the Image Base linker option defaults to 00400000. Per the help: Specifies the preferred load address of the compiled image. This value is typically only changed when compiling DLLs. Default = 400000 Is there no effect for changing it on EXE's? What would the effect be? Is the address relative to each process? ...

Delphi - GridPanel does not adjust at first resize

Hi. I have a problem I am unable to solve even though I spend long time trying to do it. I usually use GridPanels to align controls on forms. It has, however, an annoying bug. When the GridPanel align mode is alClient and I maximize its parent window, the GridPanel adjusts to the new size of that window, however, the controls laying on...

Use Team Foundation Server in Delphi 7?

I'm a .NET developer and use VS2008/TFS2008. Recently, another developer has left our company and now I have to maintain his code. He was a Delphi developer (Delphi 7 mostly, but also Delphi 2007) and he didn't use any source control. Is there a way to put his code in Team Foundation Server? Integration in the Delphi IDE is a big plus. ...

Rave Reports and EAN128 Barcode

Hi I am trying to print an EAN128 barcode in Rave reports. According to the help I should be able to use the code128 component, and add the FNC1 to it. I just cannot get this to work. Can anyone please help me. ...

Why does ReadDirectoryChangesW omit events?

Hi! I use ReadDirectoryChangesW to watch a specified directory and update indexing structures whenever a change is detected. I use the following code (roughly) var InfoPointer : PFileNotifyInformation; NextOffset : DWORD; ... while (not Terminated) do begin if ReadDirectoryChangesW (FDirHandle, FBuffer, FBufferLength, True, ...

Delphi save richedit as excel

Hi, How would you go about saving TRichedit text to an Excel file? I have the data delimited with the vertical tab #9 and if I save it to .xls it opens, but I would like to save the users the trouble of saving it again as excel after opening it. Thanks, Dave Albert ...

Implementing nsIProtocolHandler with Delphi

I'm trying to build an nsIProtocolHandler implementation in Delphi. (I've done an IInternetProtocol before with success, and want to have in FireFox what I've got in Internet Explorer.) Thanks to the d-gecko project, that somehow links the TInterfacedObject magic to the nsISupports magic, I'm able to make a DLL that provides an nsIModule...

BDE Initialization Failure on Vista

I have a small datasnap server written in Delphi 2007 that accesses the BDE. It works fine on Windows 2000 and XP but from time to time (actually quite regularly) on Vista I get the error message: An error occurred while attempting to initialize the Borland Database Engine (error $2501) Closing everything down that uses the BDE fixes ...

Why am i receiving a 255 Record insertion limit on Oracle 10g using DBExpress ?

I am hitting an brick wall during normal SQL processing, When connected to Oracle 10g from a remote client w/DBEXPRESS, - using the standard dbxpora.dll + oci.dll When in a transaction, after exactly 255 record insertions, the connection hangs for 30 seconds and returns the error: ORA-03114 (as if it lost the connection...) This h...

Can tdiQuestion be added to TaskDialog.MainIcon?

Can tdiQuestion be added to TaskDialog.MainIcon? Unavailability of the "?" icon in the TaskDialog renders it almost useless. Is there any fix? ...