Skip to main content
Email Password   helpLost your password?

Sample Image - screen_shot_Genx.jpg

Introduction

Looking at the .resx file that VS.NET uses to store resources such as images, I thought wouldn't it be cool to have a XML file where you can store images and other info for you app and at startup your app gets the look and feel from the XML file dynamically. You can then change the look and feel by changing the XML file, maybe over the internet! A little investigation showed that .NET namespace System.XML has 2 great classes XMLTextWriter and XMLTextReader which does all the hard work for you with their Read/WriteBase64 methods.

m_XMLWriter.WriteStartElement("",NodeName,"");

<code>m_XMLWriter.WriteBase64(ImageBinaryBuffer,0,ImageBinaryBuffer.Length);

m_XMLWriter.WriteEndElement();

So here is my quick and dirty app, which uses 2 classes CLookXMLReader and CLookXMLWriter to do the putting in the binary and getting the binary out to bitmap or an icon. You basically use the Writer to put the images into the XML, then the reader can be used at a separate app to get the images out from the XML. Made the code a bit messy when reading the binary out from the XML, there must be a better way to it, please let me know! I hope you dont judge coding skills by just looking at this app only (I am usually much better!) :)

You must Sign In to use this message board.
 
 
Per page   
 FirstPrevNext
QuestionHow to convert .ai file(Adobe Illustrator File) to .bmp(BitMap) file in c# Pin
Santhosh_B_K
2:08 16 Apr '07  
Questionhow do I pass an image from nodes in the xml to a component on a form Pin
Try74
2:15 8 Jan '07  
Generalssl code Pin
saroj yadav
2:20 16 Oct '06  
GeneralThank You Pin
dboucher
18:01 21 Jul '05  
GeneralBinary to XML to Binary to XML fails Pin
nordhaus
12:34 18 May '05  
GeneralXmlTextReader and binary data Pin
Anonymous
5:45 10 Dec '02  
Generaldbconsts.obj Pin
Reza_Y
23:07 20 Sep '02  
GeneralSending the image size Pin
Vinla
1:24 20 Sep '02  
GeneralBitmap to a bytearray Pin
jeetu
5:44 26 Aug '02  
GeneralRe: Bitmap to a bytearray Pin
Kamen Nikolov
7:45 26 Sep '03  
GeneralRe: Bitmap to a bytearray Pin
Kamen Nikolov
7:55 26 Sep '03  
GeneralXml bunary vb6 problem in c# Pin
bcapuano
13:25 30 Jul '02  
GeneralRe: Xml bunary vb6 problem in c# Pin
Anonymous
12:44 4 Oct '02  
GeneralXml Quik Buider Pin
shak
20:48 30 Jun '02  
GeneralRe: Xml Quik Buider Pin
Christian Graus
21:09 30 Jun '02  
GeneralCan you encode the binary information to a string Pin
Anonymous
11:56 13 Jul '01  
GeneralRe: Can you encode the binary information to a string Pin
Todd Smith
12:36 13 Jul '01  
GeneralRe: Can you encode the binary information to a string Pin
Anonymous
9:51 16 Jul '01  
GeneralRe: Can you encode the binary information to a string Pin
Nathan Blomquist
7:07 12 Jun '02  
GeneralAnything like this in C++ Pin
Darren Schroeder
11:39 16 Jun '01  
GeneralRe: Anything like this in C++ Pin
wahid
6:02 18 Jun '01  


Last Updated 13 Jun 2001 | Advertise | Privacy | Terms of Use | Copyright © CodeProject, 1999-2009