HighTechTalks DotNet Forums  

Image to Icon,Icon to Image in C#

Dotnet Framework (CLR) microsoft.public.dotnet.framework.clr


Discuss Image to Icon,Icon to Image in C# in the Dotnet Framework (CLR) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
tokinka
 
Posts: n/a

Default Image to Icon,Icon to Image in C# - 08-16-2006 , 08:34 PM






Does anyone kown how to convert Image to Icon and Icon to Image easily?

Thanks.


Reply With Quote
  #2  
Old   
tokinka
 
Posts: n/a

Default Re: Image to Icon,Icon to Image in C# - 08-16-2006 , 09:01 PM






private System.Drawing.Icon ImageToIcon(System.Drawing.Image image)
{
return
System.Drawing.Icon.FromHandle(((Bitmap)image).Get Hicon());
}

private System.Drawing.Image IconToImage(Icon icon)
{
return
System.Drawing.Image.FromHbitmap(icon.ToBitmap().G etHbitmap());
}


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.