Embedded resources and the res protocol

D

Dan

Hi,

How do I embed a picture (gif for instance) in a dll using VB.NET so
that the picture can be used in a html page with the res protocol?

I have tried adding pictures (as Embedded resources) to my class
library and then accessing them from html with
<IMG SRC="res://ResLib.dll/GIF/ResLib.testpic.gif">

The name "ResLib.testpic.gif" comes from
System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceNames()

Thanks in advance,
Dan
 
C

Charles Law

Hi Dan

AFAIK .NET does not recognise the res protocol. If you have access to Visual
Studio 6, I would use it to create a dll in which you include your gifs. You
can then use the res protocol to include them by number. For example

res://c:\myproject\resource.dll/GIF/202

HTH

Charles
 
H

Herfried K. Wagner [MVP]

* (e-mail address removed) (Dan) scripsit:
How do I embed a picture (gif for instance) in a dll using VB.NET so
that the picture can be used in a html page with the res protocol?

I have tried adding pictures (as Embedded resources) to my class
library and then accessing them from html with
<IMG SRC="res://ResLib.dll/GIF/ResLib.testpic.gif">

The name "ResLib.testpic.gif" comes from
System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceNames()

This doesn't work with managed resources. You will have to add
unmanaged (Win32) resource to your application:

<URL:http://dotnet.mvps.org/dotnet/samples/codingtechnique/downloads/ResourceIcons.zip>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top