473,569 Members | 2,756 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to retrieve a bitmap from a .resx file

Visual Studio 2003
Windows XP SP2

Problem: I have lost my original xyz.bmp file.

However it is still available in my app because they get copied into the
..resx file and stores as a base64 encoded string, probably encrypted as well
as there is a publickeytoken stored in the xml record.

My question is has anybody got a bit of code that will take that string or
the panel with the backgroundimage property set to that bitmap and save this
to a file as a .bmp again.
I am sure it can be done I just aint hacker enough to do it for myself.

Any help gratefully recieved
Chris

Jul 21 '05 #1
3 2136
Hi Chris
You can always, use the reflection namespace objects to retrieve images,
docs, and anything really that was imbedded into an assembly. I don't
remember exactly how to do it... but here isd an interesting artcle:

http://www.codeproject.com/dotnet/asmex.asp
"Chris" <Ch***@discussi ons.microsoft.c om> wrote in message
news:37******** *************** ***********@mic rosoft.com...
Visual Studio 2003
Windows XP SP2

Problem: I have lost my original xyz.bmp file.

However it is still available in my app because they get copied into the
.resx file and stores as a base64 encoded string, probably encrypted as
well
as there is a publickeytoken stored in the xml record.

My question is has anybody got a bit of code that will take that string or
the panel with the backgroundimage property set to that bitmap and save
this
to a file as a .bmp again.
I am sure it can be done I just aint hacker enough to do it for myself.

Any help gratefully recieved
Chris

Jul 21 '05 #2
Felipe
Thanks for trying,

asmex will recreate the resource from an exe but not dig out the individual
bitmap from that resource.

Chris
Jul 21 '05 #3
I found a solution and here it is for anybody else with a similiar problem:

http://www.codeproject.com/dotnet/ResourceEditor.asp

Its a little tool that allows you to edit resource files etc. It integrates
with VS.2003 and all you do is open the resx file ( from within VS )
containing the missing .bmp double click the image in the display and it
loads the image editor. From there its just a "Save as" away from recovered

Thanks Filipe for putting me on the right line and double thanks to Gaston
for ResourceEditor.

Jul 21 '05 #4

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

Similar topics

0
1671
by: Carl Mercier | last post by:
(I'm using C# 2.0) Hi, I have placed an icon file in resources.resx. The problem is that I don't know how to retrieve it. In VB.NET 2.0, My.Resources.MyIcon does the trick, but what's the C# equivalent? Unfortunately, what happens under the hood with the My namespace is not well documented. Reflector on Microsoft.VisualBasic.dll
0
499
by: David Krussow | last post by:
I had an aspx page (mypage.aspx) with a code behind file (mypage.aspx.cs) that in turn had a resx file (mypage.aspx.resx). I decided to create another aspx page (myotherpage.aspx) that would reuse the code-behind from the first page (mypage.aspx.cs). I hooked everything together and both aspx pages work great. In the process I renamed the...
3
327
by: Chris | last post by:
Visual Studio 2003 Windows XP SP2 Problem: I have lost my original xyz.bmp file. However it is still available in my app because they get copied into the ..resx file and stores as a base64 encoded string, probably encrypted as well as there is a publickeytoken stored in the xml record. My question is has anybody got a bit of code that...
5
63766
by: Joăo Santa Bárbara | last post by:
hi there i have this error in VS2005 DEV Edition "Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information." i have create an windows forms application (exe) and in the same project i have create 2 forms
0
1676
by: prabhupr | last post by:
Hi Folks I'm currently working on a Localization+Globalization project; for this project, we need to generate ".Resx" files and we use "US English" Resx file as the base version, to compare the content with other languages. We have quite a number of Resx file and each Resx file has enough items so there is a high probability that we might...
6
4595
by: ad | last post by:
I wnat to load a file in an .resx file and transfer the file to a stream. How can I do?
7
12273
by: nws_reader | last post by:
I have a web service that needs to return a particular string for one of its web methods. I would like to manage the strings in a resource file. I went through a lot of the help provided on the net and can't seem to get it to work. Can someone with expertise assure me this is possible as a Web Service (using C#)? If so, can someone...
5
9441
by: =?Utf-8?B?QXhlbCBEYWhtZW4=?= | last post by:
Hi, I've created a class library assembly containing several string resource files, like: - TableColumns.resx - TableColumns.de.resx - General.resx - General.de.resx
8
14928
by: raylopez99 | last post by:
I have the latest version of Visual Studio 2008 Professional, which allows you to create resource files (this is the .resx file, no?), unlike the Express version, which does not. I am trying to cut and paste code that MSDN recommends for playing a simple wav file from inside an embedded file, like presumeably the 'resources' file .resx is. ...
0
7924
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8120
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7672
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5512
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3640
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1212
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
937
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.