Currently this is the way I have things setup. I have an installer in my
project. I added a folder to the installer package and added all of the
image files to the installer package folder. I the declare the in the code
and then call them.
Dim myImage as New Bitmap(Application.StartupPath & "\Images")
PictureBox.Image = myImage
When I embed the in the executable and then remove them for the installer
package folder, how do I then reference them in my code? Also, should they
be disposed of when the form is closed and the image is no longer being
used. I'm talking about fifty or sixty images here and am concerned with
system resource usage.
On a side note. I also have my icon files and banner images for the
installer package in the same above mentioned folder. How do I embed them.
The properties page in the dialog boxes of the installer package seems to
only allow yout o look in the folder you have setup in the installer
package.
Thank you,
John
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:Ou**************@TK2MSFTNGP12.phx.gbl...
* "jcrouse" <me> scripsit: I saw an article, once, on how to package image file in the installer so
they are not accessible to the end user. I want to say hidden, but I
don't just mean the file attribute of the image file. Does anyone know of the
article I'm speaking of or a link on how to embed (another poor choice
of words) the image files in the executable?
Description of the necessary steps for embedding an icon file, other
image formats will work similar:
Add the icon file to your project and set its 'Build Action' property to
'Embedded Resource'. You can use the code below to load the icon at
runtime:
\\\
foo.Icon = _
New Icon( _
[Assembly].GetExecutingAssembly().GetManifestResourceStream( _
"WindowsApplication1.Ball.ico" _
) _
)
///
'WindowsApplication1' is the root namespace of the application, "Ball.ico"
is the icon's filename.
--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>