Click here to Skip to main content
15,889,315 members
Home / Discussions / C#
   

C#

 
GeneralRe: add a button on Save As dialogue tool bar Pin
Andy Moore2-Mar-05 2:42
Andy Moore2-Mar-05 2:42 
Generaldebugging Exe Pin
montu33772-Mar-05 0:06
montu33772-Mar-05 0:06 
GeneralRe: debugging Exe Pin
Colin Angus Mackay2-Mar-05 0:22
Colin Angus Mackay2-Mar-05 0:22 
GeneralRe: debugging Exe Pin
leppie2-Mar-05 3:39
leppie2-Mar-05 3:39 
GeneralReboot a Remote Machine in .net Pin
realmontanakid1-Mar-05 23:53
realmontanakid1-Mar-05 23:53 
Generalchange webservice path Pin
WDI1-Mar-05 23:15
WDI1-Mar-05 23:15 
GeneralRe: change webservice path Pin
Kodanda Pani2-Mar-05 0:07
Kodanda Pani2-Mar-05 0:07 
GeneralImageStream from Resource... Pin
Norman-Timo1-Mar-05 22:13
Norman-Timo1-Mar-05 22:13 
Hello C#-Community!

I´ve a problem with a ImageStream from a Resource file.

My programming partner (not available anymore) used some nice icons (I hope they are icons!), but he embedded them in a resource-file.

It´s no problem to get these Images via:

<br />
private System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(TestRessource));<br />
private System.Windows.Forms.ImageList imlIcons;<br />
<br />
// ..<br />
<br />
this.imlIcons.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imlIcons.ImageStream")));<br />
<br />
imlIcons.Images[0].Save("test.ico", ImageFormat.Icon);<br />
<br />


But the Save-Method did not return the expected result. The resulting .ico-file is only a Hex-File.

To understand what he is doing with the stream - here is a code snippet from the resource file:


<data name="imlIcons.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value> Private</value>
</data>
<data name="imlIcons.Location" type="System.Drawing.Point, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</data>
<data name="imlIcons.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAFpTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0xLjAuNTAw
MC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZT

....
.....
....

</value>
</data>

Can anybody help me to save each image in a seperate .ico-files, so that I can use these icons in other applications?

Or how can I find out in which format these images are? And then how I can convert them into icons?

Please, I need help...

Norman-Timo
GeneralRe: ImageStream from Resource... Pin
Norman-Timo2-Mar-05 20:34
Norman-Timo2-Mar-05 20:34 
Questionhow to make a stealth application Pin
Mohsen Saad1-Mar-05 21:42
Mohsen Saad1-Mar-05 21:42 
AnswerRe: how to make a stealth application Pin
Norman-Timo1-Mar-05 22:45
Norman-Timo1-Mar-05 22:45 
GeneralWhy should this application not be listed in Task-Manager? Pin
Colin Angus Mackay2-Mar-05 0:21
Colin Angus Mackay2-Mar-05 0:21 
GeneralRe: Why should this application not be listed in Task-Manager? Pin
Dave Kreskowiak2-Mar-05 8:14
mveDave Kreskowiak2-Mar-05 8:14 
AnswerRe: how to make a stealth application Pin
Norman-Timo2-Mar-05 20:47
Norman-Timo2-Mar-05 20:47 
GeneralCreating cursor from image(bitmap) Pin
Liborac_1-Mar-05 21:26
Liborac_1-Mar-05 21:26 
GeneralXP Style selection highlight Pin
Radgar1-Mar-05 21:15
Radgar1-Mar-05 21:15 
GeneralRe: XP Style selection highlight Pin
Judah Gabriel Himango2-Mar-05 4:09
sponsorJudah Gabriel Himango2-Mar-05 4:09 
QuestionHow to call PostThreadMessage from outside the thread function Pin
saha2k51-Mar-05 19:28
saha2k51-Mar-05 19:28 
AnswerRe: How to call PostThreadMessage from outside the thread function Pin
leppie1-Mar-05 19:59
leppie1-Mar-05 19:59 
Generalregexpression highlight results Pin
Pyro Joe1-Mar-05 16:07
Pyro Joe1-Mar-05 16:07 
GeneralRe: regexpression highlight results Pin
leppie2-Mar-05 3:47
leppie2-Mar-05 3:47 
Generaltime Pin
Anonymous1-Mar-05 15:24
Anonymous1-Mar-05 15:24 
GeneralRe: time Pin
Bojan Rajkovic1-Mar-05 16:54
Bojan Rajkovic1-Mar-05 16:54 
GeneralRe: time Pin
Luis Alonso Ramos1-Mar-05 16:59
Luis Alonso Ramos1-Mar-05 16:59 
GeneralRe: time Pin
Luis Alonso Ramos1-Mar-05 16:56
Luis Alonso Ramos1-Mar-05 16:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.