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

ResXResourceReader

I am tryng to read a resource file using the following code and I am getting
an error stating that it can't find it in the C:\Windows\System32 directory.
I do not want to place it in that directory as I have it included in my
project as an embedded resource in a specific directory. I receive the error
as soon as it tries to perform the GetEnumerator.

Any ideas?

Here is a snippet of the code:

Private en As IDictionaryEnumerator
Private rsxr As System.Resources.ResXResourceReader

rsxr = New ResXResourceReader("menus.resx")
en = rsxr.GetEnumerator
Jun 27 '08 #1
2 4370
You need to specifiy a path i.e.

rsxr = New ResXResourceReader("C:\SomePath\menus.resx")
"roryos" <ro****@discussions.microsoft.comwrote in message
news:B0**********************************@microsof t.com...
>I am tryng to read a resource file using the following code and I am
getting
an error stating that it can't find it in the C:\Windows\System32
directory.
I do not want to place it in that directory as I have it included in my
project as an embedded resource in a specific directory. I receive the
error
as soon as it tries to perform the GetEnumerator.

Any ideas?

Here is a snippet of the code:

Private en As IDictionaryEnumerator
Private rsxr As System.Resources.ResXResourceReader

rsxr = New ResXResourceReader("menus.resx")
en = rsxr.GetEnumerator


Jun 27 '08 #2


"Kevin S Gallagher" wrote:
You need to specifiy a path i.e.

rsxr = New ResXResourceReader("C:\SomePath\menus.resx")
"roryos" <ro****@discussions.microsoft.comwrote in message
news:B0**********************************@microsof t.com...
I am tryng to read a resource file using the following code and I am
getting
an error stating that it can't find it in the C:\Windows\System32
directory.
I do not want to place it in that directory as I have it included in my
project as an embedded resource in a specific directory. I receive the
error
as soon as it tries to perform the GetEnumerator.

Any ideas?

Here is a snippet of the code:

Private en As IDictionaryEnumerator
Private rsxr As System.Resources.ResXResourceReader

rsxr = New ResXResourceReader("menus.resx")
en = rsxr.GetEnumerator
**************************
I just noticed that as I try and deploy this approach with the path hard
coded I am running into problems as we do not want all of the users to have
to have this resx file on their local machine. I added it to my project as
an embedded resource but it does not appear to be working that way.

I was under the impression that if it is an embedded resource that once the
code is compiled I should not need to have the resx stored on the user's
machine.

Is this not correct?
>
However, as soon as I don't fully qualify the path of the file, and only use
the file name, I get an error stating that it cannot find the file in the
c:\windows\system32 directory.

Any ideas on what I should different to get around this pathing issue?
>
Jun 27 '08 #3

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

Similar topics

1
by: Dennis C. Drumm | last post by:
Is there a way to force VS to generate a new resx file? I notice that there are some invalid entries left in the file referencing controls that no longer exist. Thanks, Dennis
1
by: Hiten | last post by:
Hi i have created one .resx file for adding 38 Images............... after creating it when i open it and reads it through IDictionaryEnumerator or by using DictionaryEntry structure i am not...
2
by: Dave L | last post by:
I'm using .NET 2002. Is the ResXResourceReader available in C++? MSDN says yes (by showing C++ function prototypes) however C++ fails to find the class. Yes, I have the using statement like: ...
3
by: al | last post by:
Hi, I use a resource file (.resx) to store user's settings such as language and other strings. The problem i'm facing is that when the user changes one of the strings in the resource file, ...
0
by: Amihai | last post by:
Hi, I have form that contain an UserControl, when i added a propertie type of List<MyObj> to the UserControl, the project still build and run successfully, but the design of the form show me...
3
by: forest demon | last post by:
for example, let's say I do something like, System.Diagnostics.Process.Start("notepad.exe","sample.txt"); if the user does a SaveAs (in notepad), how can i capture the path that the user...
0
by: =?Utf-8?B?U2ltb25EZXY=?= | last post by:
Hi All I would like to install the same Windows Service project on the same server under different names, one for each customer. I have been able to do it but I would like an expert opinion as...
2
by: =?Utf-8?B?TmF0aGFuIFdpZWdtYW4=?= | last post by:
Hi, I am wondering why the .NET Framework is quite different from Win32 API when it comes to displaying system modal message boxes. Consider the four following types of system modal message...
0
by: Darrel | last post by:
Anyone know what would cause this error. It's not a typical error, it's text that is shown instead of what my usercontrol is supposed to render. ---------------------------- text/microsoft-resx...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
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...

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.