Page 2 of 2 First 12
  • Jump to page:
    #16
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2008
    Posts
    62
    Rep Power
    0
    Actually that was something I noticed. Every once in awhile I accidentally double click a GUI item and it generates an event handler which I have to go and remove so I'm not too worried about understanding the generated code. For the most part it makes sense.
  2. #17
  3. Contributing User
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jan 2003
    Location
    USA
    Posts
    7,255
    Rep Power
    2222
    formCalc.Designer.cs:
    Code:
    namespace calc
    {
        partial class formCalc
        {
            /// <summary>
            /// Required designer variable.
            /// </summary>
            private System.ComponentModel.IContainer components = null;
    
            /// <summary>
            /// Clean up any resources being used.
            /// </summary>
            /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
            protected override void Dispose(bool disposing)
            {
                if (disposing && (components != null))
                {
                    components.Dispose();
                }
                base.Dispose(disposing);
            }
    
            #region Windows Form Designer generated code
    
            /// <summary>
            /// Required method for Designer support - do not modify
            /// the contents of this method with the code editor.
            /// </summary>
            private void InitializeComponent()
            {
                this.textBoxDisplay = new System.Windows.Forms.TextBox();
                this.button1 = new System.Windows.Forms.Button();
                this.button5 = new System.Windows.Forms.Button();
                this.button6 = new System.Windows.Forms.Button();
                this.button7 = new System.Windows.Forms.Button();
                this.button8 = new System.Windows.Forms.Button();
                this.button9 = new System.Windows.Forms.Button();
                this.button0 = new System.Windows.Forms.Button();
                this.buttonPoint = new System.Windows.Forms.Button();
                this.buttonMultiply = new System.Windows.Forms.Button();
                this.buttonDivide = new System.Windows.Forms.Button();
                this.button4 = new System.Windows.Forms.Button();
                this.buttonSubtract = new System.Windows.Forms.Button();
                this.buttonEquals = new System.Windows.Forms.Button();
                this.button3 = new System.Windows.Forms.Button();
                this.button2 = new System.Windows.Forms.Button();
                this.buttonAdd = new System.Windows.Forms.Button();
                this.buttonSign = new System.Windows.Forms.Button();
                this.buttonClear = new System.Windows.Forms.Button();
                this.buttonClearError = new System.Windows.Forms.Button();
                this.SuspendLayout();
                // 
                // textBoxDisplay
                // 
                this.textBoxDisplay.AccessibleRole = System.Windows.Forms.AccessibleRole.Text;
                this.textBoxDisplay.Location = new System.Drawing.Point(36, 21);
                this.textBoxDisplay.Name = "textBoxDisplay";
                this.textBoxDisplay.Size = new System.Drawing.Size(217, 20);
                this.textBoxDisplay.TabIndex = 0;
                this.textBoxDisplay.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
                // 
                // button1
                // 
                this.button1.Location = new System.Drawing.Point(36, 120);
                this.button1.Name = "button1";
                this.button1.Size = new System.Drawing.Size(29, 23);
                this.button1.TabIndex = 1;
                this.button1.Text = "1";
                this.button1.UseVisualStyleBackColor = true;
                this.button1.Click += new System.EventHandler(this.buttonNum_Click);
                // 
                // button5
                // 
                this.button5.Location = new System.Drawing.Point(71, 91);
                this.button5.Name = "button5";
                this.button5.Size = new System.Drawing.Size(29, 23);
                this.button5.TabIndex = 2;
                this.button5.Text = "5";
                this.button5.UseVisualStyleBackColor = true;
                this.button5.Click += new System.EventHandler(this.buttonNum_Click);
                // 
                // button6
                // 
                this.button6.Location = new System.Drawing.Point(106, 91);
                this.button6.Name = "button6";
                this.button6.Size = new System.Drawing.Size(29, 23);
                this.button6.TabIndex = 3;
                this.button6.Text = "6";
                this.button6.UseVisualStyleBackColor = true;
                this.button6.Click += new System.EventHandler(this.buttonNum_Click);
                // 
                // button7
                // 
                this.button7.Location = new System.Drawing.Point(36, 62);
                this.button7.Name = "button7";
                this.button7.Size = new System.Drawing.Size(29, 23);
                this.button7.TabIndex = 4;
                this.button7.Text = "7";
                this.button7.UseVisualStyleBackColor = true;
                this.button7.Click += new System.EventHandler(this.buttonNum_Click);
                // 
                // button8
                // 
                this.button8.Location = new System.Drawing.Point(71, 62);
                this.button8.Name = "button8";
                this.button8.Size = new System.Drawing.Size(29, 23);
                this.button8.TabIndex = 5;
                this.button8.Text = "8";
                this.button8.UseVisualStyleBackColor = true;
                this.button8.Click += new System.EventHandler(this.buttonNum_Click);
                // 
                // button9
                // 
                this.button9.Location = new System.Drawing.Point(106, 62);
                this.button9.Name = "button9";
                this.button9.Size = new System.Drawing.Size(29, 23);
                this.button9.TabIndex = 6;
                this.button9.Text = "9";
                this.button9.UseVisualStyleBackColor = true;
                this.button9.Click += new System.EventHandler(this.buttonNum_Click);
                // 
                // button0
                // 
                this.button0.Location = new System.Drawing.Point(36, 149);
                this.button0.Name = "button0";
                this.button0.Size = new System.Drawing.Size(29, 23);
                this.button0.TabIndex = 7;
                this.button0.Text = "0";
                this.button0.UseVisualStyleBackColor = true;
                this.button0.Click += new System.EventHandler(this.buttonNum_Click);
                // 
                // buttonPoint
                // 
                this.buttonPoint.Location = new System.Drawing.Point(106, 149);
                this.buttonPoint.Name = "buttonPoint";
                this.buttonPoint.Size = new System.Drawing.Size(29, 23);
                this.buttonPoint.TabIndex = 8;
                this.buttonPoint.Text = ".";
                this.buttonPoint.UseVisualStyleBackColor = true;
                this.buttonPoint.Click += new System.EventHandler(this.buttonNum_Click);
                // 
                // buttonMultiply
                // 
                this.buttonMultiply.Location = new System.Drawing.Point(163, 91);
                this.buttonMultiply.Name = "buttonMultiply";
                this.buttonMultiply.Size = new System.Drawing.Size(29, 23);
                this.buttonMultiply.TabIndex = 9;
                this.buttonMultiply.Text = "*";
                this.buttonMultiply.UseVisualStyleBackColor = true;
                this.buttonMultiply.Click += new System.EventHandler(this.buttonOperation_Click);
                // 
                // buttonDivide
                // 
                this.buttonDivide.Location = new System.Drawing.Point(163, 62);
                this.buttonDivide.Name = "buttonDivide";
                this.buttonDivide.Size = new System.Drawing.Size(29, 23);
                this.buttonDivide.TabIndex = 10;
                this.buttonDivide.Text = "/";
                this.buttonDivide.UseVisualStyleBackColor = true;
                this.buttonDivide.Click += new System.EventHandler(this.buttonOperation_Click);
                // 
                // button4
                // 
                this.button4.Location = new System.Drawing.Point(36, 91);
                this.button4.Name = "button4";
                this.button4.Size = new System.Drawing.Size(29, 23);
                this.button4.TabIndex = 11;
                this.button4.Text = "4";
                this.button4.UseVisualStyleBackColor = true;
                this.button4.Click += new System.EventHandler(this.buttonNum_Click);
                // 
                // buttonSubtract
                // 
                this.buttonSubtract.Location = new System.Drawing.Point(163, 120);
                this.buttonSubtract.Name = "buttonSubtract";
                this.buttonSubtract.Size = new System.Drawing.Size(29, 23);
                this.buttonSubtract.TabIndex = 12;
                this.buttonSubtract.Text = "-";
                this.buttonSubtract.UseVisualStyleBackColor = true;
                this.buttonSubtract.Click += new System.EventHandler(this.buttonOperation_Click);
                // 
                // buttonEquals
                // 
                this.buttonEquals.Location = new System.Drawing.Point(203, 149);
                this.buttonEquals.Name = "buttonEquals";
                this.buttonEquals.Size = new System.Drawing.Size(29, 23);
                this.buttonEquals.TabIndex = 13;
                this.buttonEquals.Text = "=";
                this.buttonEquals.UseVisualStyleBackColor = true;
                // 
                // button3
                // 
                this.button3.Location = new System.Drawing.Point(106, 120);
                this.button3.Name = "button3";
                this.button3.Size = new System.Drawing.Size(29, 23);
                this.button3.TabIndex = 14;
                this.button3.Text = "3";
                this.button3.UseVisualStyleBackColor = true;
                this.button3.Click += new System.EventHandler(this.buttonNum_Click);
                // 
                // button2
                // 
                this.button2.Location = new System.Drawing.Point(71, 120);
                this.button2.Name = "button2";
                this.button2.Size = new System.Drawing.Size(29, 23);
                this.button2.TabIndex = 15;
                this.button2.Text = "2";
                this.button2.UseVisualStyleBackColor = true;
                this.button2.Click += new System.EventHandler(this.buttonNum_Click);
                // 
                // buttonAdd
                // 
                this.buttonAdd.Location = new System.Drawing.Point(163, 149);
                this.buttonAdd.Name = "buttonAdd";
                this.buttonAdd.Size = new System.Drawing.Size(29, 23);
                this.buttonAdd.TabIndex = 16;
                this.buttonAdd.Text = "+";
                this.buttonAdd.UseVisualStyleBackColor = true;
                this.buttonAdd.Click += new System.EventHandler(this.buttonOperation_Click);
                // 
                // buttonSign
                // 
                this.buttonSign.Location = new System.Drawing.Point(71, 149);
                this.buttonSign.Name = "buttonSign";
                this.buttonSign.Size = new System.Drawing.Size(29, 23);
                this.buttonSign.TabIndex = 17;
                this.buttonSign.Text = "+/-";
                this.buttonSign.UseVisualStyleBackColor = true;
                this.buttonSign.Click += new System.EventHandler(this.buttonNum_Click);
                // 
                // buttonClear
                // 
                this.buttonClear.Location = new System.Drawing.Point(203, 62);
                this.buttonClear.Name = "buttonClear";
                this.buttonClear.Size = new System.Drawing.Size(29, 23);
                this.buttonClear.TabIndex = 18;
                this.buttonClear.Text = "C";
                this.buttonClear.UseVisualStyleBackColor = true;
                this.buttonClear.Click += new System.EventHandler(this.buttonClear_Click);
                // 
                // buttonClearError
                // 
                this.buttonClearError.Location = new System.Drawing.Point(203, 91);
                this.buttonClearError.Name = "buttonClearError";
                this.buttonClearError.Size = new System.Drawing.Size(29, 23);
                this.buttonClearError.TabIndex = 19;
                this.buttonClearError.Text = "CE";
                this.buttonClearError.UseVisualStyleBackColor = true;
                this.buttonClearError.Click += new System.EventHandler(this.buttonClear_Click);
                // 
                // formCalc
                // 
                this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
                this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
                this.ClientSize = new System.Drawing.Size(292, 201);
                this.Controls.Add(this.buttonClearError);
                this.Controls.Add(this.buttonClear);
                this.Controls.Add(this.buttonSign);
                this.Controls.Add(this.buttonAdd);
                this.Controls.Add(this.button2);
                this.Controls.Add(this.button3);
                this.Controls.Add(this.buttonEquals);
                this.Controls.Add(this.buttonSubtract);
                this.Controls.Add(this.button4);
                this.Controls.Add(this.buttonDivide);
                this.Controls.Add(this.buttonMultiply);
                this.Controls.Add(this.buttonPoint);
                this.Controls.Add(this.button0);
                this.Controls.Add(this.button9);
                this.Controls.Add(this.button8);
                this.Controls.Add(this.button7);
                this.Controls.Add(this.button6);
                this.Controls.Add(this.button5);
                this.Controls.Add(this.button1);
                this.Controls.Add(this.textBoxDisplay);
                this.Name = "formCalc";
                this.Text = "Calc";
                this.ResumeLayout(false);
                this.PerformLayout();
    
            }
    
            #endregion
    
            private System.Windows.Forms.TextBox textBoxDisplay;
            private System.Windows.Forms.Button button1;
            private System.Windows.Forms.Button button5;
            private System.Windows.Forms.Button button6;
            private System.Windows.Forms.Button button7;
            private System.Windows.Forms.Button button8;
            private System.Windows.Forms.Button button9;
            private System.Windows.Forms.Button button0;
            private System.Windows.Forms.Button buttonPoint;
            private System.Windows.Forms.Button buttonMultiply;
            private System.Windows.Forms.Button buttonDivide;
            private System.Windows.Forms.Button button4;
            private System.Windows.Forms.Button buttonSubtract;
            private System.Windows.Forms.Button buttonEquals;
            private System.Windows.Forms.Button button3;
            private System.Windows.Forms.Button button2;
            private System.Windows.Forms.Button buttonAdd;
            private System.Windows.Forms.Button buttonSign;
            private System.Windows.Forms.Button buttonClear;
            private System.Windows.Forms.Button buttonClearError;
        }
    }
    Just looks like straight linear code to me.

    Another thought is that since this is generated code, mucking with it in novel ways could confuse Visual Studio and even break the project. Remember, every time you change the graphical design or change a control's property, VS will change this generated code, perhaps even regenerate it all over again.

    However, I am glad that it's opened up for us so that if the project does break we have a fighting chance to fix it. I remember VB3 and especially Visual FoxPro where so much was hidden from us that if something did break, we usually had no choice but to start all over again.
    Last edited by dwise1_aol; May 19th, 2009 at 06:15 PM.
Page 2 of 2 First 12
  • Jump to page:

IMN logo majestic logo threadwatch logo seochat tools logo