Solved

argh --one of those contact borland errors

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone 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

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…
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…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

730 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