PC Review


Reply
Thread Tools Rate Thread

bug with icon as embedded resource

 
 
=?Utf-8?B?TWljaGFlbCBaaW1kYXJz?=
Guest
Posts: n/a
 
      26th Jan 2007
Hi!

After converting our project from .net framework 1.1 to 2.0, we encounter a
probable bug while using and manipulating icons loaded from an embedded
resource. The following code can be used to reproduce the behaviour:

Stream Input = typeof(Form1).Assembly.GetManifestResourceStream("Icon.ico");
Icon Icon= new Icon( Input );
Icon.ToBitmap(); // throws an AccessViolationException

The icon file contains one icon with the dimensions 24 x 16 pixel. With
square icons everythings works as it should.

You can also crash visual studio 2005: Just try to load the icon file into
the resource designer. If the first (or only) icon inside the file is 24 x 16
pixel, the studio will crash.

Is this a known bug? When will a fix be available?
We are using .net framework 2.0 with hofixes KB917283 and KB922770,
Visual Studio 2005 with SP1, Windows XP SP2

With .net framework 1.1 the same code works correctly.

Regards,
Michael Zimdars


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
getting icon from embedded resource farseer@optonline.net Microsoft VB .NET 6 12th Oct 2005 02:55 PM
Icon & embedded resource =?Utf-8?B?UGlwcG8=?= Microsoft VB .NET 2 23rd Jun 2005 01:28 AM
Icon as embedded resource Garrett Microsoft VB .NET 8 23rd Mar 2005 01:37 AM
Add embedded resource icon =?Utf-8?B?Um9nZXJpbyBKdW4=?= Microsoft Dot NET Compact Framework 1 16th Mar 2005 11:32 PM
Add a embedded resource icon =?Utf-8?B?Um9nZXJpbyBKdW4=?= Microsoft C# .NET 2 16th Mar 2005 02:16 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:08 AM.