Re: Packaging Image Files in the Installer
From: Herfried K. Wagner [MVP] (hirf-spam-me-here_at_gmx.at)
Date: 07/11/04
- Next message: Herfried K. Wagner [MVP]: "Re: Different Language causing bugs"
- Previous message: Herfried K. Wagner [MVP]: "Re: no result with WM_GETTEXT"
- In reply to: jcrouse: "Packaging Image Files in the Installer"
- Next in thread: jcrouse: "Re: Packaging Image Files in the Installer"
- Reply: jcrouse: "Re: Packaging Image Files in the Installer"
- Messages sorted by: [ date ] [ thread ]
Date: 11 Jul 2004 23:31:14 +0200
* "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/>
- Next message: Herfried K. Wagner [MVP]: "Re: Different Language causing bugs"
- Previous message: Herfried K. Wagner [MVP]: "Re: no result with WM_GETTEXT"
- In reply to: jcrouse: "Packaging Image Files in the Installer"
- Next in thread: jcrouse: "Re: Packaging Image Files in the Installer"
- Reply: jcrouse: "Re: Packaging Image Files in the Installer"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|