Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Duplicate resources error

Status
Not open for further replies.

sggaunt

Programmer
Jul 4, 2001
8,620
GB
I don't do much component writeing so this is probobly down to inexperiance in this area.
I needed a Spinedit that works in Hexadecimal as well as Decimal, so I made some mods to the Spinedit sample component.
The new component 'Hexedit' works fine, until you drop one on a form where there is also a Spinedit. then you get the Duplicate resources error.
I belive this is happening because they are both trying to access the same windows resoure i.e the Arrow graphics for the buttons.
The help file suggests that you phone Borland if you get this message don't. The problem is cured by removing one or the other of the components.

But it should be possible to have both on a form. (there is no problem with multiple instances of Hexedit.)
Has anyone any suggestions?.
Steve...

 
This usually means that Delphi added a DCR file to your package.

If it's there, remove it and recompile.

There is already a reference to load DCR inside the composite source code.
Billy H

bhogar@acxiom.co.uk
 
Thanks Will
But I am not quite with you here.
I created my own THexedit.dcr file so that the component can have it's own icon. (it contains no other information that I know of), is this the file you mean ? I added the component to my Delphi users componets 'DCLUsr30' package.

Steve.



 
What I mean is when you add a component to a form it updates tthe uses part og the code module, with the spin edit it ads StdCtrls, Spin.

Check that these are not duplicated when you add both a spinEdit and you hexSpin.

If this is not the case send me a copy of your hexSpin with the code and I will have a look for you. (a second pair of eyes and all that)
Billy H

bhogar@acxiom.co.uk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top