473,396 Members | 2,039 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Packaging Image Files in the Installer

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?

Thanks,
John
Nov 20 '05 #1
5 1576
* "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/>
Nov 20 '05 #2
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/>

Nov 20 '05 #3
* "jcrouse" <me> scripsit:
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.
If you load them like I load the images in the sample I posted in the
previous message, you can/should dispose the images when you don't need
them any more.
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.


I don't know that.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #4
Oops, sorry I didn't notice your code. I tried it but don't understand the
[Assembly] parameter. Should I add an assembly to my project and somehow add
the image (jpg) files to the assembly?

Thanks,
John

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:Of**************@TK2MSFTNGP09.phx.gbl...
* "jcrouse" <me> scripsit:
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.
If you load them like I load the images in the sample I posted in the
previous message, you can/should dispose the images when you don't need
them any more.
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.
I don't know that.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 20 '05 #5
Resolved! New thread started for installer packaging.
"jcrouse" <me> wrote in message news:ed*************@TK2MSFTNGP09.phx.gbl...
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?

Thanks,
John

Nov 20 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: J | last post by:
Hi everyone, I have created an App that embedds the python interpreter and I am now in the process of creating an installer. I am currently linking python24.lib, but it is only 184k and I...
19
by: Blair Adamache | last post by:
IBM is hosting a user focus session to get feedback on a new design concept for installing software products and maintenance. The information below gives a brief summary of the information about...
15
by: John Nagle | last post by:
I've been installing Python and its supporting packages on a dedicated server with Fedora Core 6 for about a day now. This is a standard dedicated rackmount server in a colocation facility,...
60
by: jim | last post by:
I am looking for an application that will wrap my .Net application (and any needed .Net parts) into a single exe. I know of Thinstall ($4,000 for application and per copy fees for your exes) and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.