By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,771 Members | 1,709 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,771 IT Pros & Developers. It's quick & easy.

.net resource files question...

P: n/a
....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
Share this Question
Share on Google+
7 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a

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 discussion thread is closed

Replies have been disabled for this discussion.