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

Resource Files & Image Extraction Help Win[C#]

I'm having trouble extaction my image from my resource file using
DictionaryEnumerator & ResourceReader. String extractions are good.

I've been trying to look online for exact info on this, but alas, I can't
find any and I am not sure if this is possilbe. My code sample below and any
and all help is appreciated.

//This part works just fine
private void Save_Click(object sender, System.EventArgs e)

{

try

{

ResourceWriter rw = new ResourceWriter(@"C:\HOST_BACHEND.resources");

//

rw.AddResource("LOGO", this.pBox_Logo.Image);

rw.AddResource("HEADER_1", "HEADER TEST");

//

rw.Generate();

rw.Close();

}

catch(Exception myException)

{

MessageBox.Show(myException.Message);

}

}

----------------------------------------

//Extraction is the problem for just the image

try

{

IResourceReader reader = new ResourceReader(@"C:\HOST_BACHEND.resources");

IDictionaryEnumerator en = reader.GetEnumerator();

//

while (en.MoveNext())

{

MessageBox.Show(en.Key.ToString() +"\n" + en.Value.ToString()

+"\n" + en.Current.ToString() +"\n" + en.Entry.ToString());

if(en.Key.ToString() == "LOGO")

{

??????

}

if(en.Key.ToString() == "HEADER_1")

{

MessageBox.Show(en.Value.ToString());

}

}

}

catch(Exception myException)

{

MessageBox.Show(myException.Message);

}
Thanks

MikeY
Jan 22 '08 #1
0 1159

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

Similar topics

2
by: Brian Henry | last post by:
does anyone know how to extract resource files from .NET applications? Being they are not standard resource files like the old Win32 ones (the .res files), ,is there any applications or such that...
0
by: MikeY | last post by:
With Reference/Resource is there a way of embedding the .resource file within a folder of my application instead of having it in the main project /executing assembly area. i.e. if I have a folder...
2
by: Don Tucker | last post by:
Hello, I have a Windows Application that needs to load multiple image files in response to users clicking buttons. Currently, I just have these images as .jpg files on disk, but I don't want to...
11
by: Alan T | last post by:
I added a resource file into my project, to store the caption of buttons and labels.. How do I make use of this resource file to dynamically assign to the buttons and labels ?
1
by: Chukkalove | last post by:
I originally created several "copy" resource reader classes which worked great individually, but after I converted them into an parent class with children they no longer find the resources. Each...
8
by: CodeLeon | last post by:
Hi, All. I am creating a setup program. The way it works is that the user creates their setup info, my program generates the C# code for a setup executable, embeds the xml file containing the info...
3
by: nor | last post by:
Hi, I've application to capture video of image and grab the still image. It runs well until I put loop to regrab the still images many times automatically. It gives one exception error:...
7
by: craig | last post by:
....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...
2
by: =?Utf-8?B?R3JlZw==?= | last post by:
I've added some ICO Images to some buttons on my forms. I added them by selecting an Image via the "Select Resource" window. Anyway, all of my images are working just fine, I am getting a WARNING...
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: 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...

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.