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



"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.




.



Relevant Pages

  • Re: ERROR_RESOURCE_TYPE_NOT_FOUND error comes
    ... Made DLL which contains resources like dialog, ... Made a static lib project which contains classes for resources ... This control is populated by lib classes. ... locale ID, and if not found, is defaulted to the app .exe itself. ...
    (microsoft.public.vc.mfc)
  • Re: #pragma lib buggers everything up
    ... A lot of the resources are relevant to the static ... a client exe, and I experienced these too, i.e. the exe can't use any ... Have a resource-only DLL, you might say, - yes, I did consider this but the ... > and often on a particular version of the compiler and particular compiler ...
    (microsoft.public.vc.language)
  • Re: Technical Delphi Question (but not about coding)
    ... Thanks very much for your proferred solutions, ... > Windows 2003 Server allow users to rename a running EXE. ... > loading/reloading of resources from the original EXE cause problems? ... > Delphi apps manage resource loading differently than other apps? ...
    (borland.public.delphi.non-technical)
  • Re: Technical Delphi Question (but not about coding)
    ... > Windows 2003 Server allow users to rename a running EXE. ... > loading/reloading of resources from the original EXE cause problems? ...
    (borland.public.delphi.non-technical)
  • Re: deployment question
    ... The best way in .Net sould be decided looking at your app, I mean, if your ... app does not need to access local OS resources ... you should put the .exe in your server and create the shortcut for users, ... updates in the server and get it distributed automatically (you'll have to ...
    (microsoft.public.dotnet.framework.setup)