Solved

argh --one of those contact borland errors

Posted on 1999-01-20
4
146 Views
Last Modified: 2010-04-06
hi,
i am using bitmaps etc from a res file.there was no prob
with calling the bitmaps (forms background pictures)from the res file when testing on a dummie project with one form,but when i move to main project i get the errors below .the error is duplicated for each form.
ERROR:(0): TYPE 2 (BITMAP),ID BGROUND:.
ERROR:(0): File StockRes.Res resource kept; File StockRes.Res resource discarded..

i think it is because i am using the same bitmap for background on 14 forms,i am calling the bitmaps on formcreate as it wouldnt work on form paint?
any ideas how i can call bitmaps from resource without this error occurring would be appreciated
Regards Barry
0
Comment
Question by:inthe
  • 2
  • 2
4 Comments
 
LVL 12

Accepted Solution

by:
rwilson032697 earned 100 total points
ID: 1362644
Are you including the resource file in each form unit? If so this will be causing the problem.

In any event, the resource file should only be included into the project once. The best place is in the DPR file:

I assume you include it like this:

{$R MyResources.Rec}

Cheers,

Raymond.
0
 
LVL 17

Author Comment

by:inthe
ID: 1362645
wahey Thanks a lot for answer
no need to call borland any more that was the problem, i put {$R StockRes.Res} in each form not just main one,when i put it only in main one it works great.
but why can this {$R *.DFM} be ok then? isnt it still be loaded on each form .
Regards Barry
0
 
LVL 12

Expert Comment

by:rwilson032697
ID: 1362646
Barry: The {$R *.DFM} is really just a short hand notation for {$R MyForm.DFM}, so only the DFM for that one form is included at that point. Confusing I know.

Cheers,

Raymond.

0
 
LVL 17

Author Comment

by:inthe
ID: 1362647
ahh of course ,the way i was thinking it would be {$R *.DPR}

Anyway thanks again :-)
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This video discusses moving either the default database or any database to a new volume.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now