FromHandle not supported

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

since methods like Icon.FromHandle() are not supported in the .NET CF I'd like to know if there is another way to "transfer" a HICON to the Icon class!

Kind Regards
 
An article on this should appear on OpenNETCF.org shortly (probably by
tomorrow). It is waiting to be published

--
Alex Feinman
---
Coming to MDC? make sure to stop by the session CLI345
on Thursday for OpenNETCF talk

hfr said:
Hi,

since methods like Icon.FromHandle() are not supported in the .NET CF I'd
like to know if there is another way to "transfer" a HICON to the Icon
class!?
 
Yes, and yes. Thank you.

--
Alex Feinman
---
Coming to MDC? make sure to stop by the session CLI345
on Thursday for OpenNETCF talk

hfr said:
Creat article!!

Two questions:

1. from your source code
//ICONDIRENTRY
wrt.Write((byte)32); // width
wrt.Write((byte)32); // height

Should be(?):
wrt.Write((byte)nWidth); // width
wrt.Write((byte)nHeight); // height
nWidth and nHeight are set to 16 or 32 above in your code


2. Should use try/catch (or finally?) to free unmanaged resources
(HANDLES) if something happends?
 
Back
Top