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

Share image resources between projects

I am interested in hearing how other people have handled sharing
resources in multiple projects (for example, a save icon).

We have a product that has many forms within many projects. Many of
these forms have a save button with an icon (along with other common
buttons and icons). At this point, we've added the icon to each
project.

Unfortunately, if we want to change the icon, we now have to go to
every project and change it. It would be nice if all the buttons used
an icon from a shared resource assembly but I can't figure out how to
enable something like that in the designer.

Any ideas would be appreciated.

Oct 17 '07 #1
3 2941
You can embed the image as a resource into a DLL assembly.

--
HTH,

Kevin Spencer
Chicken Salad Surgeon
Microsoft MVP

"bbrewder" <bb******@gmail.comwrote in message
news:11*********************@q3g2000prf.googlegrou ps.com...
>I am interested in hearing how other people have handled sharing
resources in multiple projects (for example, a save icon).

We have a product that has many forms within many projects. Many of
these forms have a save button with an icon (along with other common
buttons and icons). At this point, we've added the icon to each
project.

Unfortunately, if we want to change the icon, we now have to go to
every project and change it. It would be nice if all the buttons used
an icon from a shared resource assembly but I can't figure out how to
enable something like that in the designer.

Any ideas would be appreciated.

Oct 18 '07 #2

I have the same problem. I could embed the images into a dll assembly
but I don't know how access them while designing the screen. Can
anyone tell me how?

Thank you,

Cassio Tavares

On 18 out, 09:56, "Kevin Spencer" <unclechut...@nothinks.comwrote:
You can embed the image as a resource into a DLL assembly.

--
HTH,

Kevin Spencer
Chicken Salad Surgeon
Microsoft MVP

"bbrewder" <bbrew...@gmail.comwrote in message

news:11*********************@q3g2000prf.googlegrou ps.com...
I am interested in hearing how other people have handled sharing
resources in multiple projects (for example, a save icon).
We have a product that has many forms within many projects. Many of
these forms have a save button with an icon (along with other common
buttons and icons). At this point, we've added the icon to each
project.
Unfortunately, if we want to change the icon, we now have to go to
every project and change it. It would be nice if all the buttons used
an icon from a shared resource assembly but I can't figure out how to
enable something like that in the designer.
Any ideas would be appreciated.

Oct 22 '07 #3
I ended up creating a resource assembly, using the resource generator
from Code Project (http://www.codeproject.com/dotnet/
ResXFileCodeGeneratorEx.asp - creates a strongly typed class for
resources that is public), adding a new property to the button control
for the image type (I need this for icons on buttons so the image
types would be open, create new, save, close, delete, etc.). When the
user sets the image type, I get the image set (both the small and
large icon) from the resource file.

I used a UITypeEditor to display a list of the available image types
which I got from the resource class (I could have used a
TypeConverter, but I already had a convenient base UITypeEditor
available). If the image type property is set, I do not serialize the
image properties (if the image properties are serialized, the images
will be added to the project).

This is certainly not a simple process (it took me a couple of hours
and I am fairly experienced with many of these designer issues) and it
forced me to do some odd things to make it work. I hope VS 2008 allows
external resource assemblies to be used in the WinForms designer.

Brian Brewder

On Oct 22, 6:01 am, CassioT <cass...@gmail.comwrote:
I have the same problem. I could embed the images into a dll assembly
but I don't know how access them while designing the screen. Can
anyone tell me how?

Thank you,

Cassio Tavares

On 18 out, 09:56, "Kevin Spencer" <unclechut...@nothinks.comwrote:
You can embed the image as a resource into a DLL assembly.
--
HTH,
Kevin Spencer
Chicken Salad Surgeon
Microsoft MVP
"bbrewder" <bbrew...@gmail.comwrote in message
news:11*********************@q3g2000prf.googlegrou ps.com...
>I am interested in hearing how other people have handled sharing
resources in multiple projects (for example, a save icon).
We have a product that has many forms within many projects. Many of
these forms have a save button with an icon (along with other common
buttons and icons). At this point, we've added the icon to each
project.
Unfortunately, if we want to change the icon, we now have to go to
every project and change it. It would be nice if all the buttons used
an icon from a shared resource assembly but I can't figure out how to
enable something like that in the designer.
Any ideas would be appreciated.- Hide quoted text -

- Show quoted text -

Oct 22 '07 #4

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

Similar topics

1
by: DelboyJay | last post by:
I have found a strange resource problem, but luckily I have also found the solution which was not obvious from the runtime exception. I really think that the compiler should pick up this problem...
24
by: Hardy | last post by:
I'm pretty new in this field. when reading some 70x material, I met with this term but cannot catch its accurate meaning. who can help me? thanks in advance:)~
1
by: D. Yates | last post by:
Hi, I am looking for an example of how to extract bitmap images from an embedded resource file (a file with *.res extension, which can be viewed inside of the ide and can hold bitmaps, icons,...
3
by: Ron L | last post by:
I have an application that I am developing that is a front end for a SQL database. We will also be developing a subset of the UI that will work as a (mainly) standalone client that will make a...
5
by: aiki727 via DotNetMonster.com | last post by:
Hello everyone, Where do I store a bitmap or jpeg that I am using for a forms background image when I deploy the application? Or do I link these files to the app during the deployment? Thanks...
10
by: Mirek Endys | last post by:
Is there a posibility to make web control, that is drawing an image to webpage without needing to save it into a file? (for example, i will save picture into db server and I want to show it...
15
by: Neo | last post by:
Hello All, I found that ASP.net website only accepts code withing site directory. This creates big hurdle in shairng code. How to share code between two websites, like the way share between two...
2
by: Penelope Dramas | last post by:
Hello, I'm trying to keep my application as small as possible and would like to know if there's any way to share resources (primarily images) between projects. Thank you
4
by: Daniel Jeffrey | last post by:
I have created a Resource file that stores common icons used in my projects. I have a solution that contains 2 projects, and I keep getting errors if I add the resource file to both projects. ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.