Repost: Resource Files



Resposting because I think it got lost. I never saw it show up on my
news server.

---------------------------------------------------------------------------------------------------

Hey all.

Well, I am trying to load an image (bitmap) from a resource file into a
TImage component, but I am having trouble. When I run the app from
Delphi, it gives me a "Could not find resource 1000" error for some
reason. The resource file *is* compiled into my project and the file
itself was built without issues.

Here is the code I am using to try to load the file into the TImage:

{ Code }
Image1.Picture.Bitmap.LoadFromResourceName(0, '1000');
{ End Code}

1000 is the name I gave the resource. Even when I try calling the file
using the actual file name, I get the same exact error.

What in the world am I doing wrong here? It's baffled me and all of the
searches I have done have lead me to the exact same code I am already
using... so it's got to be something fundamentally simply, yet elusive.

Any help you can give would be great!

Many thanks in advance.

-- Ryan

.



Relevant Pages

  • Resource Files
    ... TImage component, ... The resource file *is* compiled into my project and the file ... Here is the code I am using to try to load the file into the TImage: ... I get the same exact error. ...
    (comp.lang.pascal.misc)
  • Extracting runat server objects from aspx
    ... I'm trying to programmatically extract all of the objects in a .aspx ... So far I've managed to load the assembly ... app that loads a .net dll dynamically and then creates a resource file ... containing all of the user displayable elements (HTML selects, buttons, ...
    (microsoft.public.dotnet.framework)
  • Re: Image List Control Problems
    ... Google Advanced Group Search ... Once they're in the resource file, they should be safe from any corruption. ... form load, or any time you want to refresh the list, do something like.... ... 'Use the images from the ImageList control as you are now.. ...
    (microsoft.public.vb.controls)
  • Re: dynamic resource
    ... yes I'd like to load new bitmap ... But resource file looks like is static. ... I use ATL/MFC applicatation. ...
    (microsoft.public.vc.mfc)
  • Re: Loading Image in Rich Text Box
    ... Well,the problem of loading images into Rich Text Box is faced by many ... You can store the image in a resource file and then extract it to a file. ... > Any ideas on how I can fix this code or another way to load an image into ...
    (microsoft.public.vb.general.discussion)