Re: How to load resorces of a form that is not loaded
- From: "Eduardo" <mm@xxxxxx>
- Date: Tue, 7 Oct 2008 01:57:18 -0300
"Randy Birch" <rgb_removethis@xxxxxxxx> escribió en el mensaje
news:%23XP2PQDKJHA.5904@xxxxxxxxxxxxxxxxxxxxxxx
Hmmm... don't ever remember reading that was possible. There is a *very*
complicated API - updateresource I believe - but I've never seen a
successful VB demo of it. And as far as I know, an app can't update itself
when running.
But I don't need to update the exe when the exe is already running.
I have to add the resources at compilation, when I have the resources that I
need to add.
When the program is running at the end user machine, I don't have the
resources any more.
And as far as I know, an app can't update itself when running.
It could be done making another exe, executing this new one and from this,
delete the old one. Then, do the same to preserve the original file name.
But this could have trouble with Vista, firewalls and antivirus.
But anyway, it is another case, I don't need to update the exe at runtime,
as I said.
--
Randy
ms mvp - visual basic
http://vbnet.mvps.org/
"Eduardo" <mm@xxxxxx> wrote in message news:gcelmn$sa3$1@xxxxxxxxxxx
Hello Randy,
"Randy Birch" <rgb_removethis@xxxxxxxx> escribió en el mensaje
news:uwNAAfCKJHA.1160@xxxxxxxxxxxxxxxxxxxxxxx
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.
And is there any way to add resources dynamically _by code_ (not with a
resource file) at compilation?
I don't care if they are stored as standard resources or like the forms
does, embedded somehow in the exe, as long as I can access then later at
any time when the exe is compiled.
Note: I need to do that from an ocx to the host program, not from the exe
project itself.
Thanks.
.
- References:
- How to load resorces of a form that is not loaded
- From: Eduardo
- Re: How to load resorces of a form that is not loaded
- From: Randy Birch
- Re: How to load resorces of a form that is not loaded
- From: Eduardo
- Re: How to load resorces of a form that is not loaded
- From: Randy Birch
- How to load resorces of a form that is not loaded
- Prev by Date: Re: How to load resorces of a form that is not loaded
- Next by Date: RE: Need help with sqlite3.dll
- Previous by thread: Re: How to load resorces of a form that is not loaded
- Next by thread: Re: How to load resorces of a form that is not loaded
- Index(es):
Relevant Pages
|