This works for me. Dim p As stdole.IPicture p = CardBitMap.Get(index) Dim bmp As Bitmap Dim ip As IntPtr ip = New IntPtr(p.Handle) bmp = Bitmap.FromHbitmap(ip)
-----Original Message----- From: Moderated discussion of advanced .NET topics. [mailto:[EMAIL PROTECTED]] On Behalf Of Alex Yakhnin Sent: Wednesday, May 01, 2002 1:32 PM To: [EMAIL PROTECTED] Subject: [ADVANCED-DOTNET] IPicture to .NET Image Hi All, Does anybody know on how I can convert the IPicture that I get through COM Interop to a .NET Bitmap object? I've tried Image.FromHbitmap by passing a IPicture.Handle but was getting an exception. Thanks... Alex You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com. You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.