473,320 Members | 1,926 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,320 software developers and data experts.

Embedded resources and the res protocol

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
Nov 20 '05 #1
2 2534
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
"Dan" <da*@iregren.com> wrote in message
news:7d**************************@posting.google.c om...
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

Nov 20 '05 #2
* da*@iregren.com (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>

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #3

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

Similar topics

13
by: Alexander May | last post by:
Hi, I love Python! I've been using it for a couple of years now and have found it to be a highly productive language. I evangelize it to my developer friends and am probably responsible for...
0
by: Philipp Seidel | last post by:
Hi there! I did not know, where this topic fits in, so I put it here. I have a minor problem with embedded resources, which puzzles me quite a lot. I'd be glad if anyone can help me on this: ...
5
by: Drew | last post by:
Assembly asm = Assembly.GetExecutingAssembly(); me = new Bitmap(asm.GetManifestResourceStream("me.gif")); I have used this before without any problem, but now I get: An unhandled exception...
0
by: Chris Schremser | last post by:
I have a question regarding embedded controls in IE. We are looking to replace a small VB ActiveX control with something written in C#. We have written the control and it instantiates correctly...
2
by: Kyle Kaitan | last post by:
I have an assembly (AppResources.dll) which contains a number of embedded resource files. Most of these are key/value pairs of relevant strings; a few are images and sounds; some more are XML...
7
by: Wysiwyg | last post by:
Is there any way to add an embedded resource to a project without copying it to the project's directory? I have shared resources and don't want each project using the images, xml files, etc. to...
4
by: Jon Rista | last post by:
I have a project where I need to create a windows .exe by compiling code and linking in some resources. This program thats being generated is somewhat unconventional, and I'll explain how. I'm...
0
by: Johann Blake | last post by:
I'm having trouble grasping how ASP.NET correctly locates resources. There is plenty of documentation on this subject but some things are not clear at all. In my ASP.NET application, I have...
1
by: pvogel | last post by:
Hi Folks, I've got an asynchronous pluggable protocol (APP) handler implemented (based on the excellent work here: http://www.codeproject.com/aspnet/AspxProtocol.asp) that works absolutely...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.