求救:vb.net保存的icon图不能做icon圖標,
用的是vb.net picturebox1.image.save("c:\ok.ico",System.Drawing.Imaging.ImageFormat.Icon)
生成后不能用.好像不是icon格式.
------解决思路----------------------
Using bm As New Bitmap(picturebox1.Image)
Using iconBm As New Bitmap(bm, New Size(32, 32))
Using iconx As Icon = Icon.FromHandle(iconBm.GetHicon())
Using stream As Stream = New System.IO.FileStream("c:\ok.ico", System.IO.FileMode.Create)
iconx.Save(stream)
End Using
End Using
End Using
End Using
winform程序可以这样,ico转出来一般效果不太理想,基本上都一个鸟样,你自己再看看效果,不知你要作何用。