Re: How to load resorces of a form that is not loaded

Tech-Archive recommends: Speed Up your PC by fixing your registry



If the resources are added to the *project* (not to a form or to a picture on a form) using the VB resource editor, you can reference those from anywhere within your application to display as required wherever you want. But as you've discovered, images etc. that are part of a form (e.g., in a picture, or a set of icons in an imagelist) are not "resources" (in the C meaning of the word) but are rather integrated throughout the compiled exe. Referencing those is impossible without loading the form the picture is contained on, then referencing the picture.

--


Randy
ms mvp - visual basic
http://vbnet.mvps.org/


"Eduardo" <mm@xxxxxx> wrote in message news:gce43l$3bq$1@xxxxxxxxxxx
I want to load the resources of a form without loading the form.

For example: The project has two forms: Form1 and Form2. Form1 is the
startup form.

Form2 has a picturebox with an image loaded in its Picture property.
At design time the data of that image is stored in the Form2.frx file. At
runtime it is stored in the exe file.

The project run, Form1 is loaded (but form2 isn't). I want to be able to load in Form1 (may be in another picturebox that is in Form1) the image of Form2.Picture1.Picture without loading Form2.

At least, I want to do that when the program is compiled. At design time I could manage my situation in another way. If can can do that at run time and also at design time, the better.

Why I need that? I'll explain it later, or you can read this discussion here:
http://tinyurl.com/3kccaw

Thanks.


.



Relevant Pages

  • Re: How to do this TD trick with CSS
    ... write stuff about your picture here... ... With some assumptions about referencing your classes in the html ...
    (alt.html)
  • Cannot Preview Pictures Stored On Server
    ... Processor: intel ... I don't have this problem if referencing a picture folder on my hard drive, ...
    (microsoft.public.mac.office.word)
  • Re: Printing the Form
    ... "Invalid Picture" error. ... I was pointing that with 'frm.Picture1' you are just referencing the picturebox or its default property, that is 'Picture', and you need the property 'Image'. ...
    (microsoft.public.vb.general.discussion)
  • Re: Large Print Sizes
    ... This message was coming in VFP6 if the picture was not in RGB format. ... It sounds like a memory leak of some kind since CLEAR RESOURCES fixed it. ... report with the syntax Test. ...
    (microsoft.public.fox.vfp.reports.printing)
  • Re: Slightly off topic but: Resource management
    ... For our small departent, I have set up a project to cover each person and ... the projects they are working on to provide a picture of how loaded they are. ... To do this I have a generic task called "Business as usual" and allocate ... If resources A & B are available only 70-80% of an average ...
    (microsoft.public.project)