delphi-7

What is the best way to embed Firebird Installation in the Installer for my app?

My app has its own installer but I have to guide my users to install Firebird on their own. I'd like to install it automatically. Thanks. ...

How to know if there is some data to be scrolled in Quantum Grid 5?

I'm working in a legacy project, in Delphi 7, which uses the Express Quantum Grid 5, from DevExpress. My grid cannot show scroll bars, so I have an external navigator to control the scrolling. I can scroll using the GridView.Site.ScrollContent(ADirection) method, but I don't know how to identify if there is some data to be scrolled in ...

What is the fastest way of stripping non alphanumeric characters from a string in Delphi7?

The characters allowed are A to Z, a to z, 0 to 9. The least amount of code or a single function would be best as the system is time critical on response to input. ...

Copy TClientDataSet contents with field configurations.

I would like to copy a whole TClientDataSet instance into another so I can recover any changes made in the original one. I've tried to saveToStream, to copy the data property but in all cases I loose the fields configurations (displayLabel, size, etc.) Is there a way to do what I'm trying? ...

AV When using a Procedure from one Component called by another

Im not sure if i have explaned this the best i can but, here we go... I have 2 Custom components on a form, Which are link together at design time through the IDE. Whenever i call a procedure from on of the Component i get the Access violation, Access violation at address 0049A614 in module 'Project2.exe'. Read of address 00000...

How do develop drawing application in delphi

I need to develop an application in Delphi where i have a TDrawGrid control and an image is displayed in the cells of the grid depending upon the kind of layout i select. i draw a line on the canvas of a the cell. the functionality i need to provide is drawing a line, drawing multiple lines on a imgae iside the cell, select any one line ...

Programmatically load CSV file into Excel Worksheet (Delphi 7)

I have a large amount of data to insert into an worksheet of an existing Excel workbook. The Excel workbook will have other worksheets containing calculations and a pivot tables. The data may have as many as 60,000 rows and more than 30 columns. This solution must work for both Excel 2003 and Excel 2007. Using the Excel OLE object is wa...

How to reduce CPU usage when moving a component in a OnMouseMove event in Delphi 7 ?

In a Delphi 7 application, I want to move a component accordingly to the mouse. Im doing something like that: procedure MyComponent.MouseMove(Sender: TObject;Shift: TShiftState; X, Y: Integer); begin AnotherComponent.Top := X; AnotherComponent.Left := Y; end; When I move the mouse the CPU usage for the main core goes up to 100% on...

Saving and Stack Overflows

I'm having a problem saving a vary large database type in Delphi. It contains an array[1..3500] of TItem, which in turn has two arrays[1..50] and [1..20]. I get a stack overflow unless I set the variable as a Pointer and use the GetMem, FreeMem commands below, but then I can't save it. Code is below. procedure TDatabase.SaveDB; var ...

Saving a TObject to a File

How can one save an Object, in its current state, to a file? So that it can immediately be read and restored with all its variables. ...

Is there a way to instantiate a class by its name in delphi?

I'd like to instantiate a class but I only have its name in a string. Is there a way? ...

LoadPackage calls initialize, but registerClass won't work.

I have a unit wich defines TBla and the following code in the initialize section: initialization RegisterClass(TBla); showMessage('registered'); This unit is inside a package. ok. In a button click on my app I have the following code: LoadPackage('C:\temp\testes_packs\pack1\Package1.bpl'); pc := GetClass('TBla'); if pc = n...

Delphi Component Saving

How best could I save this component and all internal variables? Examples of code would be appreciated. TSmall = record fName: string[30]; fAge: integer; fID_Number: string[30]; end; TRec = record ArraySmall: array[1..10] of TSmall; end; TBigComponent = class(TComponent) private fSmallArr: TRe...

How Delphi 2009 converts Delphi 7 projects re build configurations

I'm moving frequently between D7 and D2009 with library code that works with both. For ease of going both ways, I'm routinely deleting all the D2009 additional files that get created, eg *.dproj etc such that on entry to D2009 I'm only ever taking D7 files. This is nice because D2009 automatically makes a *.dproj, *.dgroup etc and apart ...

Is the xxm step by step install tutorial clear enough?

I know the xxm install guide is a lot to read and doesn't get you up and running as fast and easily as it would when you've seen it done. So I've installed xxm on a clean Windows install, and made screenshots at every step. I haven't made much tutorials before, and wouldn't even know where to start to make one of those walk-through vide...

Migrating client app to FB 2.1

I use Delphi 7 with DBExpress. I want to fully migrate my app to firebird 2.1. I already know what to do at the server side but not really sure at client side. In the TSQLConnection component I see that vendorLib property points to GDS32.dll. The driverName is Interbase and getDriverFunc is getSQLDriverINTERBASE. I don't know what to d...

Turbo Power systools stExport event in Delphi

Hello I am using turbopower's stExport from the systools' package. Using it to export a dataset. That works great. The Class makes available FOnExportProgress. This class does not have a visual component and so no object inspector to simply double click and have delphi create the event for me. Can anyone provide a simple example of how ...

Delphi - Sharing violation opening text file

I'm trying to open a text file for reading in a Delphi 7 app, but am getting I/O error 32 (sharing violation) because another application already has the file open. I've tried setting FileMode to "fmOpenRead or fmShareDenyNone" but now realise this doesn't apply to text files anyway. Is there a way of reading text files that are open by...

In delphi 7, is `try ... except raise; end;` meaningful at all?

In some Delphi 7 code I am maintaining, I've noticed a lot of instances of the following: with ADOQuery1 do begin // .. fill out sql.text, etc try execSQL; except raise; end; end; It seems to me that these try blocks could be removed, since they do nothing. However, I am wary of possible subtle side-effects.. Can any...

1 Dimensional Nesting

Does anybody have an effective Delphi software solution for nesting 1 dimensional lengths into predefined stock lengths? ...