[Mono-bugs] [Bug 74733][Wis] New - loading bitmap and drawing to picturebox dont work under mono
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Tue, 26 Apr 2005 06:50:11 -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 dnichici@hotmail.com.
http://bugzilla.ximian.com/show_bug.cgi?id=74733
--- shadow/74733 2005-04-26 06:50:11.000000000 -0400
+++ shadow/74733.tmp.9309 2005-04-26 06:50:11.000000000 -0400
@@ -0,0 +1,77 @@
+Bug#: 74733
+Product: Mono: Runtime
+Version: 1.1
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Wishlist
+Component: GC
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: dnichici@hotmail.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: loading bitmap and drawing to picturebox dont work under mono
+
+Please fill in this template when reporting a bug, unless you know what
+you are doing.
+Description of Problem:
+
+
+I am using Mono 1.1.6 on Windows XP and experienced the following
+problem. I have a form with some PictureBox controls generated using
+Visual Studio .Net. I tried to draw some rectangles and load some bitmaps
+into the PictureBox, but both didnt work, as nothing appears into the
+PictureBox. These features work when I use them directly with .NET.
+
+Steps to reproduce the problem:
+1.
+2.
+3.
+
+Actual Results:
+These features work when I use them directly with .NET but both didnt
+work, as nothing appears into the PictureBox under mono.
+
+
+Expected Results:
+
+
+How often does this happen?
+
+
+Additional Information:
+
+- using the wizzard I attach the bmp file to the picture box:
+
+ this.pictureBox1.Image = ((System.Drawing.Image)
+(resources.GetObject("pictureBox1.Image")));
+
+- in the paint event handlel of the picturebox I draw a rectangle:
+
+ this.pictureBox2.Paint += new
+System.Windows.Forms.PaintEventHandler(this.carPict_Paint);
+
+....
+
+ private void carPict_Paint(object sender,
+System.Windows.Forms.PaintEventArgs e)
+ {
+
+ // Create a local version of the graphics object for the
+PictureBox.
+ Graphics g = e.Graphics;
+
+ Pen accessPen;
+
+ Rectangle newRect = new Rectangle(0,0,100,100);
+
+ accessPen = new Pen(Color.Green, 3);
+
+ g.DrawRectangle(accessPen, newRect);
+
+
+ }