Link to home
Start Free TrialLog in
Avatar of kjteng
kjteng

asked on

HyperGrid

Anyone have used/tried HyperSpread? It is a stringgrid with some features of spreadsheet. It can be downloaded (freeware, beta with source) from
http://www.pablop.demon.co.uk/

Now my question:
when I put a formula such as =B5 in cell A1 (ie cell A1 is equal to cell B5) I alway get a run time error if the content of B5 is a string (it is ok if B5 is numeric). Such error does not occur if I run the demo (*.exe) program.  The demo program come with source. If I compile the source and run the exe I would get the same error again.
I believe someone could help me to solve this problem by correcting the source code.

Thanks.

Avatar of kjteng
kjteng

ASKER

Edited text of question.
Avatar of simonet
Why not contact the person who developed the component?
ASKER CERTIFIED SOLUTION
Avatar of philipleighs
philipleighs

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Sorry, the component is called TF1Book.

Cheers,
Phil.
Avatar of kjteng

ASKER

I wrote to the author but didn't get any reply. I post the question here because I think my problem is quite easy for those who are good in parser algorithm.  Could someone please help to review the source code. I will add 100 points if you can solve this.


philipleighs :
I have tried TF1Book (included in D3). It's good but I have problem in installing the OCX in some of the users pc. The TF1Book I have seems to be an evaluation copy - I am not sure if I can distribute it.


You can distribute the OCX that comes with Delphi. (see below). Make sure that all the files it needs are distributed:

VCF132.OCX    (needs to be registered)
MFCANS32.DLL
OC30.DLL
MSVCRT20.DLL

Don't forget those three Microsoft dlls. Could that explain the problems you've had?

Cheers,
Phil.

Clipping from Deploy.txt (in Delphi directory)
>>>>>>>>>>
4. ActiveX Controls (OCXs)
===========================================================
Delphi includes ActiveX Controls (OCXs) for use in your
applications:

  o Chart FX, copyright SoftwareFX Inc.
  o VisualSpeller Control, copyright Visual Components,
    Inc.
  o Formula One (spreadsheet), copyright Visual Components,
    Inc.
  o First Impression (VtChart), copyright Visual
    Components, Inc.
  o Graph Custom Control, copyright Bits Per Second Ltd.

The version of each of these OCXs shipped with Delphi may
be redistributed in custom Delphi applications. Such
redistribution is subject to the General Terms That Apply
to Compiled Programs and Redistributables.
<<<<<<<<<<<<
I also use F1 in my company's application. We have bought version 5.1, just like Phil, we are very impressed with it.

Alex
Avatar of kjteng

ASKER

My problem with TF1table:

1. I am unable to register vcf132.ocx (with regsvr32). I keep getting the following error message:
 LoadLibrary (c:\windows\system\vcfi32.ocx) failed
GetLastError returns 0x00000485

2. If I click Help/About Formula One in the workbook designer, I can  alway see this message: Version3.04 unregister Evaluation Copy.  I am not sure (a) whether I have the rights to distribute the ocx (b) whether such message or similar nag screen would appear somewhere sometime in my program?

Lastly I still hope someone could attempt to solve the HyperSpread problem (for 300 points). Where is Zifnab - I think he may know something about Hyperspread. He is the one who first told me about this component.
The LoadLibrary error will most likely be because one or more of these files are not present.

MFCANS32.DLL
OC30.DLL
MSVCRT20.DLL

Sorry, don't know about HyperSpread.

Cheers,
Phil.
Avatar of kjteng

ASKER

All the following files have been copied to windows\system directory:
 VCF132.OCX    
 MFCANS32.DLL
 OC30.DLL
 MSVCRT20.DLL

Do I need to have excel installed?
What is the correct way to register these dlls manually?
(I use regsvr32 vcf132.ocx but it doesn't work)
No you don't need excel.
You just copy all the files then run this command:
regsvr32 vcf132.ocx

I guess that the problem is something else.

Dependancy Viewer shows that the OCX needs these files too.

kernel32.dll
user32.dll
gdi32.dll
comdlg32.dll
oleaut32.dll

I've had problems with oleaut32.dll being too old on the original release of Win95. Prehaps you could try updating that file, or check it's version. (You need to restart in dos mode, copy the new file from the command prompt, then reboot.)

BTW, WinError.h reports 0x485 (1157) as meaning "Dll not found". I notice in your comment that first you mention "vcf132.ocx" then "vcfi32.ocx". Was this just a typo? vcfi32.ocx is the chart, vcf132.ocx is the workbook.

Of course the dll not found could be a depend dll. Here is the clipping from winerror.h

//
// MessageId: ERROR_DLL_NOT_FOUND
//
// MessageText:
//
//  One of the library files needed to run this application cannot be found.
//
#define ERROR_DLL_NOT_FOUND              1157L

Hope this helps.
Cheers,
Phil.
Avatar of kjteng

ASKER

I have all the files in the windows\system directory.
My oleaut32 is version 2.20.4122

run Regsvr oc30.dll - successfuly registered

run Regsvr VCF132.OCX  - fail

Any clue?

BTW the pc that I am trying to install the ocx is using win98 version 4.10.98
This ocx registration process really made me crazy. That is why I am evaluating other component like HyperSpread, tmsAdvSpreadGrid etc.

Hmm, I would not expect the oleaut32 to be a problem on Win98.

If you really want to nail this, then download RegMon and FileMon from www.sysinternals.com (excellent freeware).

FileMon will tell you what files regsvr32 is trying to open, and it will tell you what failed.

RegMon is the same but works on the registry.

Cheers,
Phil.
Avatar of kjteng

ASKER

Phil:
Thanks for the link to FileMon.
Now I know what is wrong - the file called Vcfidl32.dll must be copied to the winsys directory!  I wonder why this is not mentioned in the help file?

However, I have another problem: I still cannot run my exe. This time the message is :

Exception EOleysysError in module project1.exe at 0002A18D Class not registered.

and filemon show that the following were not found:
-- project1.enu.dll
-- project1.en

Please help.




Yeah, FileMon really is a great tool.

Don't worry about project1.enu & .en.
They are optional resource dlls that you can build and ship if you ever want to ship in more than one language. (They contain translated strings and forms).

OK, so after you copy over Vcfidl32.dll did you run regsvr32 vcf132.ocx again?

If you have then can you confirm that it is the spread sheet component causing the problem?

Are you using any other OCX's in your app?

You can take the same approach to solving that by using RegMon. Class not registered is the result of your app not finding a particular GUID in the CLSID key in the registry.

On the machine where there is a problem, run the app with regmon in the background. Look for a key like HKEY_CLASSES_ROOT\CLSID\{9823409-2398-2297-2987} that was not found.
Make a note of the number then look for it in the registry of your development machine. The InprocServer key under the number will tell you the name of the dll that exposes that class.

Cheers,
Phil.

PS: And thank you for telling me about Vcfidl32.dll! That little tid bit will be very useful!
Avatar of kjteng

ASKER

Yes, I did register all the necessary ocx's and reboot the pc  again after copying  Vcfidl32.dll
 
My test program do not use other OCX - It merely contain a form and a F1Table - nothing else is added.

I try what you have suggested (using regmon). Will let you know the outcome.
Avatar of kjteng

ASKER

Phil:

I tried regmon and found the the following key was not found:

HKCR\CLSID\{042BADC5-5E58-11CE-B610-524153480001}\InprocServer32

I run regedit in the development machine and found that the name for all the entries are "default"

If I run regmon with my project1.exe, I can see the following names in the 'other' column:
hKey0xC29ADC60
"C:\WINDOWS\SYSTEM\VCF132.OCX"

I cannot find HKCR\CLSID\{042BADC5-5E58-11CE-B610-524153480001}\InprocServer32
in the registry of user's pc.

How shall I add the key to the registry?
Hmm, that key not being found is exactly what you'd expect to see if regsvr32 vcf132.ocx had not been run.

On my Win95 test machine I clicked start, run and typed
regsvr32.exe vcf132.ocx
I got a message saying it was successful. Did you get this message too? Make sure you have a '1' not a 'i' as in vcfi32.dll.

Try doing this again, and then look in the registry to see if the key was added.

Here is a dump of that key on my machine. You can see that the default data for InprocServer is the full name of the ocx. RegEdit shows (Default)="[path]". The export shows @="[path]" which is the same thing.

If you still are not having any luck then you can copy this extract to a text file. Rename it to vcf132.reg. Copy it to the user's machine and double click it to add it to the registry. Note you may have to change the path (I'm using Win2000 so the path is c:\winnt\system32\vcf132.ocx. For 95/98 use c:\windows\system\vcf132.ocx. You may not need a path at all as long as the ocx is in the system directory).

I do think though that best thing is to work out why there is a problem registering with regsvr32.

>>>>>>>>>>>>>>>>>>>>>>>>
REGEDIT4

[HKEY_CLASSES_ROOT\CLSID\{042BADC5-5E58-11CE-B610-524153480001}]
@="VCI Formula One Workbook"

[HKEY_CLASSES_ROOT\CLSID\{042BADC5-5E58-11CE-B610-524153480001}\Control]
@=""

[HKEY_CLASSES_ROOT\CLSID\{042BADC5-5E58-11CE-B610-524153480001}\InprocServer32]
@="C:\\WINNT\\System32\\vcf132.ocx"

[HKEY_CLASSES_ROOT\CLSID\{042BADC5-5E58-11CE-B610-524153480001}\Insertable]
@=""

[HKEY_CLASSES_ROOT\CLSID\{042BADC5-5E58-11CE-B610-524153480001}\MiscStatus]
@="0"

[HKEY_CLASSES_ROOT\CLSID\{042BADC5-5E58-11CE-B610-524153480001}\MiscStatus\1]
@="131473"

[HKEY_CLASSES_ROOT\CLSID\{042BADC5-5E58-11CE-B610-524153480001}\ProgID]
@="VCF1.VCF1Ctrl.1"

[HKEY_CLASSES_ROOT\CLSID\{042BADC5-5E58-11CE-B610-524153480001}\ToolboxBitmap32]
@="C:\\WINNT\\System32\\vcf132.ocx, 1"

[HKEY_CLASSES_ROOT\CLSID\{042BADC5-5E58-11CE-B610-524153480001}\TypeLib]
@="{042BADC8-5E58-11CE-B610-524153480001}"

[HKEY_CLASSES_ROOT\CLSID\{042BADC5-5E58-11CE-B610-524153480001}\Version]
@="1.0"
<<<<<<<<<<<<<<<<<<<<<<<<<<

Cheers,
Phil.
Avatar of kjteng

ASKER

"Make sure you have a '1' not a 'i' as in vcfi32.dll"

You are right, Phil - The ocx I have in the winsysdir is vcfi32 not vcf132. How dump am I !

Everything works fine now. I have also tested it on another newly installed  pc and found that VCF132.ocx is the only component that need to be registered!  In fact I do not need to run regsvr32 manually. I can use InstalShield to do the work when installing the application.

Thank you for your patience and help. You comments above is really useful to me. I am going to accept you comment as answer eventhough you did not solve my HyperSpread problem. You deserve the points.

Thanks again.
OK thanks, and I'm glad it's sorted out.

Cheers,
Phil.
Hi guys,

I'm using C++ Builder to develop a stand-alone appliction. I'm encountering the same problem in applying TF1Book. I've done everything that you all recommended, and I can virtual run the application on a machine without C++ Builder. But when I tried to use the Formula One to display the data in spreadsheet, a message box said "Unknown interface." What's that? Thanks!
Now I have another problem. On my own machine when I tried to open my application that uses TF1Book, a "Error reading form" meassage box came out. It said:

"Licence information for TF1Book not found. You can not use this control in design mode. Ignore the error and continue? NOTE: Ignoring the error may cause commponents to be deleted or the property values to be lost."

Looks like it asks for the licence info for TF1Book. But I thought this ActiveX control comes with C++ Builder, and I was able to use it before. Thanks again.
Now I have another problem. On my own machine when I tried to open my application that uses TF1Book, a "Error reading form" meassage box came out. It said:

"Licence information for TF1Book not found. You can not use this control in design mode. Ignore the error and continue? NOTE: Ignoring the error may cause commponents to be deleted or the property values to be lost."

Looks like it asks for the licence info for TF1Book. But I thought this ActiveX control comes with C++ Builder, and I was able to use it before. Thanks again.
Hi JacksonC,

It's such a long time since I've used the spreadsheet component, and my skills with BCB are minimal.

If the ocx is a development only version, then it'd be worth tracking down the ocx that comes with Delphi?

Sorry I can't be of more help.

Philip.
philipleighs:

Hi there. I found this topic by searching the website. Didn't really have a look of the date it was first posted. And I've found solution for my question after that. Anyway thank a lot for your relpy. Have a nice day.