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

Resource Files & Image Extraction Help Win[C#]

P: n/a
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
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.