473,397 Members | 2,099 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,397 software developers and data experts.

.net resource files question...

....quick question for anyone who might have some experience with .net
resource files in VS 2003.

I have an application that is not localized, but I would still like to be
able to place all of the images that are used for icons across all of the
forms in all of the assemblies in a single resource file so that swaping out
an image in the resource file affects all localtions that it appears in the
app. Is there a way to create a single resource file and then have all the
forms in all assemblies refer to it for image information? Is there a
better approach?

Any help or a point in the right direction is appreciated!!

Thanks!!
Feb 14 '07 #1
7 2079
I am just switching all my forms to use a resource file. That is my
intention too.

I have not had to do any swapping yet...but i had too many imaglists with
teh same pictures on multiple forms.
So I am in the midst of going along the same approach.

If the swapping doest go smoothly...I still thing this is the better
approach...as I only have to change the image in 1 spot rather than
mulitple.

( vb 2005 ) express

I created a resource file by adding a new item, and then a text file..but
rename the file to bla.resx and it will be turned instantly into your own
resource.

Miro

"craig" <e@mail.comwrote in message
news:Ok**************@TK2MSFTNGP06.phx.gbl...
...quick question for anyone who might have some experience with .net
resource files in VS 2003.

I have an application that is not localized, but I would still like to be
able to place all of the images that are used for icons across all of the
forms in all of the assemblies in a single resource file so that swaping
out an image in the resource file affects all localtions that it appears
in the app. Is there a way to create a single resource file and then have
all the forms in all assemblies refer to it for image information? Is
there a better approach?

Any help or a point in the right direction is appreciated!!

Thanks!!

Feb 14 '07 #2
Good to see that others consider this to be a reasonable approach. Yes, I
have the same issue....the same images in image lists on many different
forms, which is very inefficient.

I am hoping to learn if there is a way to include a single resource file in
the main assembly and then have all the other assemblies reference it. Not
sure how to do that yet.
"Miro" <mi******@golden.netwrote in message
news:O%****************@TK2MSFTNGP04.phx.gbl...
>I am just switching all my forms to use a resource file. That is my
intention too.

I have not had to do any swapping yet...but i had too many imaglists with
teh same pictures on multiple forms.
So I am in the midst of going along the same approach.

If the swapping doest go smoothly...I still thing this is the better
approach...as I only have to change the image in 1 spot rather than
mulitple.

( vb 2005 ) express

I created a resource file by adding a new item, and then a text file..but
rename the file to bla.resx and it will be turned instantly into your own
resource.

Miro

"craig" <e@mail.comwrote in message
news:Ok**************@TK2MSFTNGP06.phx.gbl...
>...quick question for anyone who might have some experience with .net
resource files in VS 2003.

I have an application that is not localized, but I would still like to be
able to place all of the images that are used for icons across all of the
forms in all of the assemblies in a single resource file so that swaping
out an image in the resource file affects all localtions that it appears
in the app. Is there a way to create a single resource file and then
have all the forms in all assemblies refer to it for image information?
Is there a better approach?

Any help or a point in the right direction is appreciated!!

Thanks!!


Feb 14 '07 #3
Go into the microsoft.public.dotnet.languages.vb newsgroup.

Search for subject "New Resource"
here is the quote from Armin Zingler that he gave me...and so far it has
worked perfectly.
Menu Project -Add new item -Select "text file" and change the file
name to myicons.resx -Ok. The resource editor will open.
I am not sure if the swapping of the icons is possible inside... but i have
all my icons / pictures / everything in one resource file for the whole
program.
I think its way easier to maintain.

I beleive ( but not sure ) ... if you set your resource file to be a
reference and so its not compiled ( somehow ) into your program, you can
"link" to the files instead of imbedding them.

But at least were 70% there :-) Thats as far as I can help you so far.
Sorry

Miro

"craig" <e@mail.comwrote in message
news:eJ**************@TK2MSFTNGP03.phx.gbl...
Good to see that others consider this to be a reasonable approach. Yes, I
have the same issue....the same images in image lists on many different
forms, which is very inefficient.

I am hoping to learn if there is a way to include a single resource file
in the main assembly and then have all the other assemblies reference it.
Not sure how to do that yet.
"Miro" <mi******@golden.netwrote in message
news:O%****************@TK2MSFTNGP04.phx.gbl...
>>I am just switching all my forms to use a resource file. That is my
intention too.

I have not had to do any swapping yet...but i had too many imaglists with
teh same pictures on multiple forms.
So I am in the midst of going along the same approach.

If the swapping doest go smoothly...I still thing this is the better
approach...as I only have to change the image in 1 spot rather than
mulitple.

( vb 2005 ) express

I created a resource file by adding a new item, and then a text file..but
rename the file to bla.resx and it will be turned instantly into your own
resource.

Miro

"craig" <e@mail.comwrote in message
news:Ok**************@TK2MSFTNGP06.phx.gbl...
>>...quick question for anyone who might have some experience with .net
resource files in VS 2003.

I have an application that is not localized, but I would still like to
be able to place all of the images that are used for icons across all of
the forms in all of the assemblies in a single resource file so that
swaping out an image in the resource file affects all localtions that it
appears in the app. Is there a way to create a single resource file and
then have all the forms in all assemblies refer to it for image
information? Is there a better approach?

Any help or a point in the right direction is appreciated!!

Thanks!!



Feb 14 '07 #4
It also appears that there is a program included with the .Net SDK called
ResEdit that allows for editing of resource files. I tried this out and it
seems to work quite well for adding images to a resource file.

https://msdn.microsoft.com/library/d...hreseditor.asp

Maybe it would help you as well.
"Miro" <mi******@golden.netwrote in message
news:eb**************@TK2MSFTNGP04.phx.gbl...
Go into the microsoft.public.dotnet.languages.vb newsgroup.

Search for subject "New Resource"
here is the quote from Armin Zingler that he gave me...and so far it has
worked perfectly.
>Menu Project -Add new item -Select "text file" and change the file
name to myicons.resx -Ok. The resource editor will open.

I am not sure if the swapping of the icons is possible inside... but i
have all my icons / pictures / everything in one resource file for the
whole program.
I think its way easier to maintain.

I beleive ( but not sure ) ... if you set your resource file to be a
reference and so its not compiled ( somehow ) into your program, you can
"link" to the files instead of imbedding them.

But at least were 70% there :-) Thats as far as I can help you so far.
Sorry

Miro

"craig" <e@mail.comwrote in message
news:eJ**************@TK2MSFTNGP03.phx.gbl...
>Good to see that others consider this to be a reasonable approach. Yes,
I have the same issue....the same images in image lists on many different
forms, which is very inefficient.

I am hoping to learn if there is a way to include a single resource file
in the main assembly and then have all the other assemblies reference it.
Not sure how to do that yet.
"Miro" <mi******@golden.netwrote in message
news:O%****************@TK2MSFTNGP04.phx.gbl...
>>>I am just switching all my forms to use a resource file. That is my
intention too.

I have not had to do any swapping yet...but i had too many imaglists
with teh same pictures on multiple forms.
So I am in the midst of going along the same approach.

If the swapping doest go smoothly...I still thing this is the better
approach...as I only have to change the image in 1 spot rather than
mulitple.

( vb 2005 ) express

I created a resource file by adding a new item, and then a text
file..but rename the file to bla.resx and it will be turned instantly
into your own
resource.

Miro

"craig" <e@mail.comwrote in message
news:Ok**************@TK2MSFTNGP06.phx.gbl...
...quick question for anyone who might have some experience with .net
resource files in VS 2003.

I have an application that is not localized, but I would still like to
be able to place all of the images that are used for icons across all
of the forms in all of the assemblies in a single resource file so that
swaping out an image in the resource file affects all localtions that
it appears in the app. Is there a way to create a single resource file
and then have all the forms in all assemblies refer to it for image
information? Is there a better approach?

Any help or a point in the right direction is appreciated!!

Thanks!!



Feb 14 '07 #5
I might use that link, right now I just drag drop into my resource. But I
think that will come in handy when I want to create an external file.

This might help....

If you look at the generated code,

'Here is how my image is linked to my resource file for my "Home" button
where Home_Dark is a png file ( gif / jpg )
Me.bHome.Image = Global.MyProject.My.Resources.PicturesIcons.Home_D ark

If you look at a resx file, there is an Build Action. I think once you
change this... then thats how you link it so it doesnt imbed the image in
the exe until it compiles it each time or something.
Miro

"craig" <e@mail.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
It also appears that there is a program included with the .Net SDK called
ResEdit that allows for editing of resource files. I tried this out and
it seems to work quite well for adding images to a resource file.

https://msdn.microsoft.com/library/d...hreseditor.asp

Maybe it would help you as well.
"Miro" <mi******@golden.netwrote in message
news:eb**************@TK2MSFTNGP04.phx.gbl...
>Go into the microsoft.public.dotnet.languages.vb newsgroup.

Search for subject "New Resource"
here is the quote from Armin Zingler that he gave me...and so far it has
worked perfectly.
>>Menu Project -Add new item -Select "text file" and change the file
name to myicons.resx -Ok. The resource editor will open.

I am not sure if the swapping of the icons is possible inside... but i
have all my icons / pictures / everything in one resource file for the
whole program.
I think its way easier to maintain.

I beleive ( but not sure ) ... if you set your resource file to be a
reference and so its not compiled ( somehow ) into your program, you can
"link" to the files instead of imbedding them.

But at least were 70% there :-) Thats as far as I can help you so far.
Sorry

Miro

"craig" <e@mail.comwrote in message
news:eJ**************@TK2MSFTNGP03.phx.gbl...
>>Good to see that others consider this to be a reasonable approach. Yes,
I have the same issue....the same images in image lists on many
different forms, which is very inefficient.

I am hoping to learn if there is a way to include a single resource file
in the main assembly and then have all the other assemblies reference
it. Not sure how to do that yet.
"Miro" <mi******@golden.netwrote in message
news:O%****************@TK2MSFTNGP04.phx.gbl.. .
I am just switching all my forms to use a resource file. That is my
intention too.

I have not had to do any swapping yet...but i had too many imaglists
with teh same pictures on multiple forms.
So I am in the midst of going along the same approach.

If the swapping doest go smoothly...I still thing this is the better
approach...as I only have to change the image in 1 spot rather than
mulitple.

( vb 2005 ) express

I created a resource file by adding a new item, and then a text
file..but rename the file to bla.resx and it will be turned instantly
into your own
resource.

Miro

"craig" <e@mail.comwrote in message
news:Ok**************@TK2MSFTNGP06.phx.gbl...
...quick question for anyone who might have some experience with .net
resource files in VS 2003.
>
I have an application that is not localized, but I would still like to
be able to place all of the images that are used for icons across all
of the forms in all of the assemblies in a single resource file so
that swaping out an image in the resource file affects all localtions
that it appears in the app. Is there a way to create a single
resource file and then have all the forms in all assemblies refer to
it for image information? Is there a better approach?
>
Any help or a point in the right direction is appreciated!!
>
Thanks!!
>




Feb 14 '07 #6
Yes....that is helpful!

I was wondering how to reference the resource file from other projects. I
wonder if this works in C#.

Thanks!

"Miro" <mi******@golden.netwrote in message
news:e3**************@TK2MSFTNGP06.phx.gbl...
>I might use that link, right now I just drag drop into my resource. But I
think that will come in handy when I want to create an external file.

This might help....

If you look at the generated code,

'Here is how my image is linked to my resource file for my "Home" button
where Home_Dark is a png file ( gif / jpg )
Me.bHome.Image = Global.MyProject.My.Resources.PicturesIcons.Home_D ark

If you look at a resx file, there is an Build Action. I think once you
change this... then thats how you link it so it doesnt imbed the image in
the exe until it compiles it each time or something.
Miro

"craig" <e@mail.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
>It also appears that there is a program included with the .Net SDK called
ResEdit that allows for editing of resource files. I tried this out and
it seems to work quite well for adding images to a resource file.

https://msdn.microsoft.com/library/d...hreseditor.asp

Maybe it would help you as well.
"Miro" <mi******@golden.netwrote in message
news:eb**************@TK2MSFTNGP04.phx.gbl...
>>Go into the microsoft.public.dotnet.languages.vb newsgroup.

Search for subject "New Resource"
here is the quote from Armin Zingler that he gave me...and so far it has
worked perfectly.

Menu Project -Add new item -Select "text file" and change the file
name to myicons.resx -Ok. The resource editor will open.

I am not sure if the swapping of the icons is possible inside... but i
have all my icons / pictures / everything in one resource file for the
whole program.
I think its way easier to maintain.

I beleive ( but not sure ) ... if you set your resource file to be a
reference and so its not compiled ( somehow ) into your program, you can
"link" to the files instead of imbedding them.

But at least were 70% there :-) Thats as far as I can help you so far.
Sorry

Miro

"craig" <e@mail.comwrote in message
news:eJ**************@TK2MSFTNGP03.phx.gbl...
Good to see that others consider this to be a reasonable approach.
Yes, I have the same issue....the same images in image lists on many
different forms, which is very inefficient.

I am hoping to learn if there is a way to include a single resource
file in the main assembly and then have all the other assemblies
reference it. Not sure how to do that yet.
"Miro" <mi******@golden.netwrote in message
news:O%****************@TK2MSFTNGP04.phx.gbl. ..
>I am just switching all my forms to use a resource file. That is my
>intention too.
>
I have not had to do any swapping yet...but i had too many imaglists
with teh same pictures on multiple forms.
So I am in the midst of going along the same approach.
>
If the swapping doest go smoothly...I still thing this is the better
approach...as I only have to change the image in 1 spot rather than
mulitple.
>
( vb 2005 ) express
>
I created a resource file by adding a new item, and then a text
file..but rename the file to bla.resx and it will be turned instantly
into your own
resource.
>
Miro
>
>
>
"craig" <e@mail.comwrote in message
news:Ok**************@TK2MSFTNGP06.phx.gbl.. .
>...quick question for anyone who might have some experience with .net
>resource files in VS 2003.
>>
>I have an application that is not localized, but I would still like
>to be able to place all of the images that are used for icons across
>all of the forms in all of the assemblies in a single resource file
>so that swaping out an image in the resource file affects all
>localtions that it appears in the app. Is there a way to create a
>single resource file and then have all the forms in all assemblies
>refer to it for image information? Is there a better approach?
>>
>Any help or a point in the right direction is appreciated!!
>>
>Thanks!!
>>
>
>




Feb 14 '07 #7

One more thing:
It also lets you IMPORT the resource at teh top of the code too like any
other import.
"craig" <e@mail.comwrote in message
news:eE*************@TK2MSFTNGP02.phx.gbl...
Yes....that is helpful!

I was wondering how to reference the resource file from other projects. I
wonder if this works in C#.

Thanks!

"Miro" <mi******@golden.netwrote in message
news:e3**************@TK2MSFTNGP06.phx.gbl...
>>I might use that link, right now I just drag drop into my resource. But I
think that will come in handy when I want to create an external file.

This might help....

If you look at the generated code,

'Here is how my image is linked to my resource file for my "Home" button
where Home_Dark is a png file ( gif / jpg )
Me.bHome.Image = Global.MyProject.My.Resources.PicturesIcons.Home_D ark

If you look at a resx file, there is an Build Action. I think once you
change this... then thats how you link it so it doesnt imbed the image in
the exe until it compiles it each time or something.
Miro

"craig" <e@mail.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
>>It also appears that there is a program included with the .Net SDK
called ResEdit that allows for editing of resource files. I tried this
out and it seems to work quite well for adding images to a resource
file.

https://msdn.microsoft.com/library/d...hreseditor.asp

Maybe it would help you as well.
"Miro" <mi******@golden.netwrote in message
news:eb**************@TK2MSFTNGP04.phx.gbl...
Go into the microsoft.public.dotnet.languages.vb newsgroup.

Search for subject "New Resource"
here is the quote from Armin Zingler that he gave me...and so far it
has worked perfectly.

Menu Project -Add new item -Select "text file" and change the file
name to myicons.resx -Ok. The resource editor will open.

I am not sure if the swapping of the icons is possible inside... but i
have all my icons / pictures / everything in one resource file for the
whole program.
I think its way easier to maintain.

I beleive ( but not sure ) ... if you set your resource file to be a
reference and so its not compiled ( somehow ) into your program, you
can "link" to the files instead of imbedding them.

But at least were 70% there :-) Thats as far as I can help you so
far. Sorry

Miro

"craig" <e@mail.comwrote in message
news:eJ**************@TK2MSFTNGP03.phx.gbl...
Good to see that others consider this to be a reasonable approach.
Yes, I have the same issue....the same images in image lists on many
different forms, which is very inefficient.
>
I am hoping to learn if there is a way to include a single resource
file in the main assembly and then have all the other assemblies
reference it. Not sure how to do that yet.
>
>
"Miro" <mi******@golden.netwrote in message
news:O%****************@TK2MSFTNGP04.phx.gbl.. .
>>I am just switching all my forms to use a resource file. That is my
>>intention too.
>>
>I have not had to do any swapping yet...but i had too many imaglists
>with teh same pictures on multiple forms.
>So I am in the midst of going along the same approach.
>>
>If the swapping doest go smoothly...I still thing this is the better
>approach...as I only have to change the image in 1 spot rather than
>mulitple.
>>
>( vb 2005 ) express
>>
>I created a resource file by adding a new item, and then a text
>file..but rename the file to bla.resx and it will be turned instantly
>into your own
>resource.
>>
>Miro
>>
>>
>>
>"craig" <e@mail.comwrote in message
>news:Ok**************@TK2MSFTNGP06.phx.gbl. ..
>>...quick question for anyone who might have some experience with
>>.net resource files in VS 2003.
>>>
>>I have an application that is not localized, but I would still like
>>to be able to place all of the images that are used for icons across
>>all of the forms in all of the assemblies in a single resource file
>>so that swaping out an image in the resource file affects all
>>localtions that it appears in the app. Is there a way to create a
>>single resource file and then have all the forms in all assemblies
>>refer to it for image information? Is there a better approach?
>>>
>>Any help or a point in the right direction is appreciated!!
>>>
>>Thanks!!
>>>
>>
>>
>
>




Feb 14 '07 #8

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

Similar topics

5
by: John Perks and Sarah Mount | last post by:
When handling resources in Python, where the scope of the resource is known, there seem to be two schools of thought: (1) Explicit: f = open(fname) try: # ... finally: f.close()
1
by: Gabriel Lozano-Morán | last post by:
First of all sorry for the cross-posting but I am not sure wether this belongs under internationalization or just general. Environment: Visual Studio .NET 2003 Problem: Newly added and...
12
by: bj7lewis | last post by:
I am working on a project I want to add a few files as resource to access(copy them to FS and use) at runtime. So far in VS.NET IDE, I Add Files to the project and set its Build Action to...
3
by: Jules | last post by:
i'm working with translators that just want to translate "web pages" and not deal with resource files. i'd like to have a file structure that looks sort of like this: / <- root directory where...
1
by: urban.john | last post by:
Here are my steps: create resource files from resx files: <echo message="CREATING RESOURCE FILES FROM RESGEN EN" /> <resgen todir="product\resources_en" verbose="true"> <resources> <include...
1
by: Jason | last post by:
Greetings , I'm studying for a MS exam and I'm a little confused about assemblies. Not what they are but just a specific comment that I'm reading and it doesn't make sense to me. It reads ...
4
by: TCook | last post by:
Hey All, I am building a solution which will have many strings that will need to be localized (i.e. strings for toolbars, strings for different WinForms, strings for messages and error messages,...
7
by: Rich | last post by:
I am resurrecting this question (since it got bumped down by more recent posts). This is probably very simple - I need to add a version resource to a DLL project in MSVC++ 2005 Express in order...
12
by: TS | last post by:
i have a need to possibly enable mutli language support. What benefit do i get by using a resource file instead of a custom xml solution? thanks!
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.