1

I have a form that is almost empty, it only have a custom control named Panel_Pedidos the code just have the default constructor whith the InitializeComponent function the design file is this

        private void InitializeComponent()
        {
            this.panel_Pedidos1 = new testWinControl.Panel_Pedidos();
            this.SuspendLayout();
            // 
            // panel_Pedidos1
            // 
            this.panel_Pedidos1.Dock = System.Windows.Forms.DockStyle.Fill;
            this.panel_Pedidos1.Location = new System.Drawing.Point(0, 0);
            this.panel_Pedidos1.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
            this.panel_Pedidos1.Name = "panel_Pedidos1";
            this.panel_Pedidos1.Size = new System.Drawing.Size(1005, 609);
            this.panel_Pedidos1.TabIndex = 0;
            // 
            // Pantalla_Pedidos
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(10F, 20F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(1005, 609);
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
            this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
            this.Controls.Add(this.panel_Pedidos1);
            this.Font = new System.Drawing.Font("Microsoft Sans Serif", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.Margin = new System.Windows.Forms.Padding(5);
            this.Name = "Pantalla_Pedidos";
            this.ShowIcon = false;
            this.ResumeLayout(false);

        }

        #endregion

        private Panel_Pedidos panel_Pedidos1;

Panel_Pedidos have any fail at design time, it opens normally where can be the problem?

Cesar Romeroo
  • 183
  • 1
  • 1
  • 12
  • 1
    Check the constructor and Load() of testWinControl.Panel_Pedidos, it is fired in design time. Maybe the property base.DesignMode helps you. You can check this post: http://stackoverflow.com/questions/2427381/how-to-detect-that-c-sharp-windows-forms-code-is-executed-within-visual-studio – Mat-Tap Aug 01 '14 at 20:33
  • 1
    Your're right! i just found that in Panel_Pedidos where filling data just like if it where a normal form, Thanks! – Cesar Romeroo Aug 01 '14 at 20:54
  • I can't understand the relationship between the question title and the code. – Steve Aug 01 '14 at 21:47
  • The title name is the fail that i get when I try to load the form in the design mode But I found that the mistake was in the Panel_Pedidos UserControl – Cesar Romeroo Aug 04 '14 at 02:56

0 Answers0