[Mono-dev] MonoDevelop freezes on resizing windows form

Steve Ricketts velocedge at hotmail.com
Sun Nov 7 16:04:43 EST 2010


Mono 2.6.4 openSuse 11.3

I'm trying to resize a windows form and when I run it in MonoDevelop
(2.2.2), it freezes the desktop.  The problem occurs when I reference
videoPanel.  I thought maybe I needed an Invoke here but it doesn't seem to
change anything.  Does anyone know why this is happening?

					videoPanel.Invoke ((MethodInvoker)delegate {

						if (thisWidth * .75m > thisHeight) 

						{

							thisWidth = thisHeight * 1.32m;

				        		videoPanel.Width = Convert.ToInt32(thisHeight);
  <--- problem
							videoPanel.Height = this.Height;

							videoPanel.Top = 0;

							thisValue = Convert.ToDecimal(videoPanel.Width) / 2;

							videoPanel.Left = Convert.ToInt32((thisWidth / 2) - thisValue);

						}

						else

						{

							thisHeight = thisWidth * .75m;

				        	videoPanel.Width = this.Width;

							videoPanel.Height = Convert.ToInt32(thisHeight);

							videoPanel.Left = 0;

							thisValue = Convert.ToDecimal(videoPanel.Height);

							videoPanel.Top = Convert.ToInt32((thisHeight / 2) - thisValue);

						}

					});


designer.cs
            // videoPanel

            // 

            this.videoPanel.Location = new System.Drawing.Point(1, 1);

            this.videoPanel.Name = "videoPanel";

            this.videoPanel.Size = new System.Drawing.Size(320, 240);

            this.videoPanel.TabIndex = 2;

            this.videoPanel.TabStop = false;


-- 
View this message in context: http://mono.1490590.n4.nabble.com/MonoDevelop-freezes-on-resizing-windows-form-tp3031178p3031178.html
Sent from the Mono - Dev mailing list archive at Nabble.com.


More information about the Mono-devel-list mailing list