Resource File Editor

  • Thread starter Thread starter Shadowboxer
  • Start date Start date
S

Shadowboxer

How do I add an Icon or bmp or jpg to a resource file?

there doesnt appear to be a clear way to do so in the IDE....

thanks -J
 
Add the image fie to your project and then in the item properties set the
Build Action to EmbeddedResource
 
Shadowboxer said:
How do I add an Icon or bmp or jpg to a resource file?

there doesnt appear to be a clear way to do so in the IDE....

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.
 
Back
Top