【发布时间】:2011-05-24 12:24:19
【问题描述】:
我目前有一个 System.Drawing.Bitmap,我需要将其转换为 stdole.StdPicture。
目前我正在使用:
var pic = (stdole.StdPicture)Microsoft.VisualBasic.Compatibility.VB6.Support.ImageToIPicture
(MyDLL.Properties.Resources.Img); // this is a System.Drawing.Bitmap
但我收到编译器警告:
警告 'Microsoft.VisualBasic.Compatibility.VB6.Support.ImageToIPicture(System.Drawing.Image)' 已过时:'"Microsoft.VisualBasic.Compatibility.* 类已过时且仅在 32 位进程中受支持。http://go.microsoft.com/fwlink/?linkid=160862
那么用什么代替呢?我还没有找到其他解决方案...
【问题讨论】:
标签: c# interop compatibility ole