DelphiFAQ Home Search:
General :: Programming :: Delphi :: Delphi IDE
Information about the Delphi IDE, add-in experts and wizards.


This list is sorted by recent document popularity (not total page views).
New documents will first appear at the bottom.

Only the 40 most recently viewed articles are shown.
You can see the full list here.

Featured Article

Delphi 4/5 and Formula 1 Spreadsheet ActiveX control

I ran into some problems when upgrading a work environment from Delphi 4 to Delphi 5, where the Formula 1 Spreadsheet ActiveX control (OCX) was involved.

Normal installation of an OCX:

- Menu 'Component | Import ActiveX Control'

- In the list of ActiveX controls, select 'VC Formula One'. If it is not in the list, use the 'Add' button to insert the OCX (\winnt\system32\vcf15.ocx)

- Option step: Hit button 'Create Unit'.
This will create an import unit 'VCF15_TLB.PAS', by default into this directory:
The 'TLB' means 'Type Library'.

- Hit Button 'Install'. If needed, this will create the import unit (see previous step).
Then this import unit will be added to a - selected - package.

- Open this package, compile and if necessary install it.

This procedure worked fine for Formula 1 with Delphi 4. However, when I had Delphi 5 create the import unit, I ran into these problems:

// ************************************************************************
// Errors:
// Hint: Member 'Type' of 'IF1FileSpec' changed to 'Type_'
// Hint: Member 'Type' of 'IF1NumberFormat' changed to 'Type_'
// Hint: Member 'Type' of 'IF1Book' changed to 'Type_'
// Hint: Parameter 'Array' of IF1Book.CopyDataFromArray changed to 'Array_'
// Hint: Parameter 'Array' of IF1Book.CopyDataToArray changed to 'Array_'
// Hint: Member 'Type' of 'IF1BookView' changed to 'Type_'
// Hint: Parameter 'Array' of IF1BookView.CopyDataFromArray changed to 'Array_'
// Hint: Parameter 'Array' of IF1BookView.CopyDataToArray changed to 'Array_'
// ************************************************************************

To make matters worse, when trying to compile the package file, I would get incompatible type errors in these lines:

property ColWidth[nCol: Integer]: Smallint read Get_ColWidth write Set_ColWidth;
property RowHeight[nRow: Integer]: Smallint read Get_RowHeight write Set_RowHeight;


I found that the manufacturer puts an import file into the Formula One directory. The name of this file is 'VCF15.pas' (instead of 'VCF15_TLB.pas')

So I had to go through all my source codes and in the uses clauses replace VCF15_TLB with VCF15.

I also noticed that arguments of type 'WideString' had to be replaced with 'String' in Delphi 5.

After these steps, I can now compile applications under Delphi 5 that use Formula 1 and the deployed executables work.

Generated 20:01:22 on Sep 21, 2017