[Mono-bugs] [Bug 43567][Nor] New - unable to load resources in VS generated application

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
Fri, 23 May 2003 05:08:06 -0400 (EDT)

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 ryabchuk@yahoo.com.


--- shadow/43567	Fri May 23 05:08:06 2003
+++ shadow/43567.tmp.842	Fri May 23 05:08:06 2003
@@ -0,0 +1,59 @@
+Bug#: 43567
+Product: Mono/Class Libraries
+Version: unspecified
+OS: All
+OS Details: 
+Status: NEW   
+Priority: Normal
+Component: CORLIB
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: ryabchuk@yahoo.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+Summary: unable to load resources in VS generated application
+Description of Problem:
+When you generate your app in VS and drop ImageList on your form, you 
+won't be able to load resources. The reason is that in VS generated code 
+the instance of ResourceManager is initialized with the type of the Form. 
+Mono's implementation assumes that the type should be derived from 
+ResourceSet and this is not so in fact.
+Steps to reproduce the problem:
+1. Create simple GUI application in VS
+2. Drop image list on the form.
+3. Add some image to the image list via Images collection
+4. At this time the code like this will be generated:
+private void InitializeComponent()
+ // ....
+System.Resources.ResourceManager resources = new 
+this.imageList1 = new System.Windows.Forms.ImageList(this.components);
+this.imageList1.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit;
+this.imageList1.ImageSize = new System.Drawing.Size(16, 16);
+this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)
+this.imageList1.TransparentColor = System.Drawing.Color.Transparent;
+5. Build and execute with mono runtime.
+Actual Results:
+The code resources.GetObject("imageList1.ImageStream") will return null 
+reference when you will try to execute the code with mono.
+Expected Results:
+Should return valid object reference of ImageListStreamer type.
+How often does this happen? 
+Additional Information:
+I think it is easier to reproduce it on Windows.