I couldnt find a built in way either. The only way I could find was to create the whole icon from scratch. The structures required are documented in some dusty corner of the msdn library, with some examples of using them here and there on the net.
The icon uses two bitmaps, one is 1bpp and gets ANDed with the background. The other is color and gets XORed with the result. (may have got the order wrong, whatever).
So we can use lockbits and then marshal.copy to the xor bitmap. And then scan through the array of colors and compare with the transparency color to set the AND bitmap.
The devil is in the detail - each row of pixels has to end on a 4 byte boundary for the xor bitmap. For the AND bitmap, it is 1bpp, and the total number of bytes used for a row also needs padding to 4 bytes. Also the structures are not very well documented, with conflicting information.
Once done, you just churn through the structures with a binarywriter...
heres an example.
Ill play some more with this, it should work for creating cursors too. Ive not got 32bpp working yet, or multiple icons in 1 file, (or < 24bpp)