[Mono-bugs] [Bug 77800][Wis] New - Windows (Form) is not shown when
is has Opacity property set.
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Thu Mar 16 06:38:02 EST 2006
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 levap at bansky.net.
http://bugzilla.ximian.com/show_bug.cgi?id=77800
--- shadow/77800 2006-03-16 06:38:02.000000000 -0500
+++ shadow/77800.tmp.1561 2006-03-16 06:38:02.000000000 -0500
@@ -0,0 +1,154 @@
+Bug#: 77800
+Product: Mono: Class Libraries
+Version: 1.1
+OS:
+OS Details: XP SP2 Czech Version
+Status: NEW
+Resolution:
+Severity:
+Priority: Wishlist
+Component: Windows.Forms
+AssignedTo: peter at novonyx.com
+ReportedBy: levap at bansky.net
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Windows (Form) is not shown when is has Opacity property set.
+
+Description of Problem:
+
+New window is not shown if it has Opacity set in it's constructor.
+If the opacity is set after the windows is created and shown, it works
+perfectly.
+
+
+Steps to reproduce the problem:
+1. Create class derived from Windows.Forms.Form
+2. Set opacity in constructor or in method called from constructor
+3. Try to create and show this class
+
+Actual Results:
+Window is not shown
+
+Expected Results:
+Window should be shown
+
+How often does this happen?
+everytime
+
+Additional Information:
+System.Windows.Forms.dll was downloaded from
+http://svn.myrealbox.com/mwf/System.Windows.Forms.dll at March 16 2006.
+
+
+Form1.cs
+--------
+
+using System;
+using System.Drawing;
+using System.Windows.Forms;
+
+namespace TestWMF
+{
+ public class Form1 : System.Windows.Forms.Form
+ {
+ public Form1()
+ {
+ InitializeComponent();
+
+ }
+
+ #region Windows Forms Designer generated code
+ /// <summary>
+ /// This method is required for Windows Forms designer support.
+ /// Do not change the method contents inside the source code editor. The
+Forms designer might
+ /// not be able to load this method if it was changed manually.
+ /// </summary>
+ private void InitializeComponent() {
+ //
+ // Form1
+ //
+ this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
+ this.ClientSize = new System.Drawing.Size(232, 526);
+ this.DockPadding.All = 1;
+ this.FormBorderStyle =
+System.Windows.Forms.FormBorderStyle.SizableToolWindow;
+ this.Name = "Form1";
+ this.Opacity = 0.88; // This line cause problem!!!!
+ this.ShowInTaskbar = false;
+ this.Text = "Form1";
+ this.TopMost = true;
+
+ }
+ #endregion
+ }
+}
+
+
+MainForm.cs
+-----------
+
+
+using System;
+using System.Drawing;
+using System.Windows.Forms;
+
+namespace TestWMF
+{
+
+ public class MainForm : System.Windows.Forms.Form
+ {
+ public Form1 newWnd;
+
+ public MainForm()
+ {
+ //
+ // The InitializeComponent() call is required for Windows Forms designer
+support.
+ //
+ InitializeComponent();
+
+ //
+ // TODO: Add constructor code after the InitializeComponent() call.
+ //
+ }
+
+ [STAThread]
+ public static void Main(string[] args)
+ {
+ Application.Run(new MainForm());
+ }
+
+ #region Windows Forms Designer generated code
+ /// <summary>
+ /// This method is required for Windows Forms designer support.
+ /// Do not change the method contents inside the source code editor. The
+Forms designer might
+ /// not be able to load this method if it was changed manually.
+ /// </summary>
+ private void InitializeComponent() {
+ //
+ // MainForm
+ //
+ this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
+ this.ClientSize = new System.Drawing.Size(248, 197);
+ this.Name = "MainForm";
+ this.Text = "MainForm";
+ this.Load += new System.EventHandler(this.MainFormLoad);
+ }
+ #endregion
+
+ void MainFormLoad(object sender, System.EventArgs e)
+ {
+ newWnd = new Form1();
+ newWnd.Show();
+
+ newWnd.WindowState = FormWindowState.Normal;
+ newWnd.Left = 400;
+ newWnd.Top = 10;
+ }
+
+ }
+}
More information about the mono-bugs
mailing list