Solved

argh --one of those contact borland errors

Posted on 1999-01-20
4
154 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

707 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