Solved

argh --one of those contact borland errors

Posted on 1999-01-20
4
152 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

856 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