[Mono-bugs] [Bug 48728][Maj] New - Windows.Forms.Form.Activated not fired
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Mon, 22 Sep 2003 16:49:33 -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 2ligkjk02@sneakemail.com.
http://bugzilla.ximian.com/show_bug.cgi?id=48728
--- shadow/48728 2003-09-22 16:49:33.000000000 -0400
+++ shadow/48728.tmp.661 2003-09-22 16:49:33.000000000 -0400
@@ -0,0 +1,110 @@
+Bug#: 48728
+Product: Mono/Class Libraries
+Version: unspecified
+OS:
+OS Details: XP
+Status: NEW
+Resolution:
+Severity:
+Priority: Major
+Component: System
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: 2ligkjk02@sneakemail.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Windows.Forms.Form.Activated not fired
+
+Description of Problem:
+The delegate System.Windows.Forms.Form.Activated is not getting fired.
+Further, the OnActivated member function does not check to see if the
+Activated delegate is null before using it.
+
+Steps to reproduce the problem:
+1. Compile and execute code at end of this report.
+
+Actual Results:
+Text box is not filled at start or with form receives focus.
+
+Expected Results:
+The text box should fill when application starts or focus it set to the
+form.
+
+How often does this happen?
+Consistently.
+
+Additional Information:
+
+namespace WinFrm
+{
+ public class Form1 : System.Windows.Forms.Form
+ {
+ private System.Windows.Forms.Button button1;
+ private System.Windows.Forms.TextBox textBox1;
+
+ public Form1()
+ {
+ this.button1 = new System.Windows.Forms.Button();
+ this.textBox1 = new System.Windows.Forms.TextBox
+();
+ this.SuspendLayout();
+ //
+ // button1
+ //
+ this.button1.Name = "button1";
+ this.button1.Location = new System.Drawing.Point
+(16, 24);
+ this.button1.Size = new System.Drawing.Size(184,
+24);
+ this.button1.TabIndex = 0;
+ this.button1.Text = "button1";
+ this.button1.Click += new System.EventHandler
+(this.button1_Click);
+ //
+ // textBox1
+ //
+ this.textBox1.Multiline = true;
+ this.textBox1.Name = "textBox1";
+ this.textBox1.Location = new System.Drawing.Point
+(16, 56);
+ this.textBox1.Size = new System.Drawing.Size(550,
+96);
+ this.textBox1.TabIndex = 1;
+ this.textBox1.Text = "textBox1";
+ //
+ // Form1
+ //
+ this.AutoScaleBaseSize = new System.Drawing.Size
+(5, 13);
+ this.ClientSize = new System.Drawing.Size(590,
+266);
+ this.Controls.AddRange(new
+System.Windows.Forms.Control[] {this.button1,this.textBox1});
+ this.Name = "Form1";
+ this.Text = "Form1";
+ this.ResumeLayout(false);
+
+ this.Activated += new System.EventHandler
+(button1_Click);
+ }
+ //[System.STAThread]
+ static void Main()
+ {
+ System.Windows.Forms.Application.Run(new Form1());
+ }
+
+ private void button1_Click(object sender,
+System.EventArgs e)
+ {
+ textBox1.Text = "Hello " +
+System.DateTime.Now.ToString();
+ textBox1.Text += "\r\nstring CodeBase: " + typeof
+( string ).Assembly.CodeBase;
+ textBox1.Text += "\r\nForms CodeBase: " + typeof(
+System.Windows.Forms.Form ).Assembly.CodeBase;
+ textBox1.Text += "\r\nDrawing CodeBase: " +
+this.button1.Location.GetType().Assembly.CodeBase;
+ }
+ }
+}