Hi Chris,

I get exception: "A generic error occurred in GDI+".
I am pretty much sure that I get a valid IPicture.

How can I find a more specific error than what I get?

Thanks... Alex


On Fri, 3 May 2002 08:37:57 -0500, Chris Sells <[EMAIL PROTECTED]>
wrote:

>Jon Flanders showed me this:
>
>        stdole.IPicture p = YourFunctionToGetAnIPicture();
>        Bitmap bmp = Bitmap.FromHbitmap(new IntPtr(p.Handle));
>
>Chris Sells
>http://www.sellsbrothers.com/
>
>> -----Original Message-----
>> From: Moderated discussion of advanced .NET topics. [mailto:ADVANCED-
>> [EMAIL PROTECTED]] On Behalf Of Alex Yakhnin
>> Sent: Wednesday, May 01, 2002 3: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.

Hi Chris,

You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced 
DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to