[Mono-bugs] [Bug 74095][Wis] New - Creating an Icon instance from embedded resource

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Fri, 25 Mar 2005 10:59:17 -0500 (EST)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by rogerio.araujo@gmail.com.

http://bugzilla.ximian.com/show_bug.cgi?id=74095

--- shadow/74095	2005-03-25 10:59:17.000000000 -0500
+++ shadow/74095.tmp.32239	2005-03-25 10:59:17.000000000 -0500
@@ -0,0 +1,55 @@
+Bug#: 74095
+Product: Mono: Class Libraries
+Version: 1.0
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: Sys.Drawing.
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: rogerio.araujo@gmail.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Creating an Icon instance from embedded resource
+
+When i try to load a embedded resource from my application i got the
+following error:
+
+Unhandled Exception: System.IO.FileNotFoundException: Resource name was not
+found: `MWF.ftpmwf.ico'
+in <0x0007d> System.Drawing.Icon:.ctor (System.Type type, System.String
+resource)
+in (wrapper remoting-invoke-with-check) System.Drawing.Icon:.ctor
+(System.Type,string)
+in [0x00c4d] (at
+/home/rogerio/desktop/projetos/dotNET/MWF/FtpMWF/FtpMWF.cs:310)
+MWF.FtpMWF:.ctor ()
+in (wrapper remoting-invoke-with-check) MWF.FtpMWF:.ctor ()
+in [0x00000] (at
+/home/rogerio/desktop/projetos/dotNET/MWF/FtpMWF/FtpMWF.cs:44)
+MWF.FtpMWF:Main (System.String[] args)
+
+
+Steps to reproduce the problem:
+1. Create a simple app with a notifyicon.
+2. Use new Icon(GetType(), "resource.ico");
+3. Run the app
+
+Actual Results:
+
+The error above.
+
+Expected Results:
+
+The Icon instance created sucessfully.
+
+How often does this happen? 
+Ever
+
+Additional Information:
+
+I'm attaching the patch with a proposal fix for this bug.