29 messaggi dal 02 dicembre 2003
Ciao a tutti, nel mio progetto ho creato una classe nel seguente modo
using System;
using System.Collections;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Windows.Forms;
using torreEventi.Tag;

namespace torreEventi.PannelloControllo
{
/// <summary>
/// Summary description for GestioneEvento.
/// </summary>
public class GestioneEvento : System.Windows.Forms.UserControl
{
private torreEventi.Tag.textData txtData;
private System.Windows.Forms.ErrorProvider errGestioneEvento;
private System.Windows.Forms.GroupBox grpEvento;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label lblData;
private System.Windows.Forms.Panel pnlEvento;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;

public GestioneEvento()
{
// This call is required by the Windows.Forms Form Designer.
InitializeComponent();

// TODO: Add any initialization after the InitializeComponent call
}

/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}

#region Component 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.txtData = new torreEventi.Tag.textData();
this.errGestioneEvento = new System.Windows.Forms.ErrorProvider();
this.grpEvento = new System.Windows.Forms.GroupBox();
this.label2 = new System.Windows.Forms.Label();
this.lblData = new System.Windows.Forms.Label();
this.pnlEvento = new System.Windows.Forms.Panel();
this.grpEvento.SuspendLayout();
this.pnlEvento.SuspendLayout();
this.SuspendLayout();
//
// txtData
//
this.txtData.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txtData.Location = new System.Drawing.Point(126, 37);
this.txtData.Name = "txtData";
this.txtData.TabIndex = 1;
this.txtData.Text = "";
this.txtData.SuspendLayout();
//
// errGestioneEvento
//
this.errGestioneEvento.ContainerControl = this;
//
// grpEvento
//
this.grpEvento.Controls.Add(this.label2);
this.grpEvento.Controls.Add(this.lblData);
this.grpEvento.Cursor = System.Windows.Forms.Cursors.Hand;
this.grpEvento.Dock = System.Windows.Forms.DockStyle.Fill;
this.grpEvento.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.grpEvento.Location = new System.Drawing.Point(0, 0);
this.grpEvento.Name = "grpEvento";
this.grpEvento.Size = new System.Drawing.Size(710, 240);
this.grpEvento.TabIndex = 4;
this.grpEvento.TabStop = false;
this.grpEvento.Text = " Gestione Evento ";
//
// label2
//
this.label2.Cursor = System.Windows.Forms.Cursors.Default;
this.label2.Location = new System.Drawing.Point(16, 80);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(80, 15);
this.label2.TabIndex = 1;
this.label2.Text = "Descrizione :";
//
// lblData
//
this.lblData.Cursor = System.Windows.Forms.Cursors.Default;
this.lblData.Location = new System.Drawing.Point(16, 37);
this.lblData.Name = "lblData";
this.lblData.Size = new System.Drawing.Size(112, 15);
this.lblData.TabIndex = 0;
this.lblData.Text = "Data (gg/mm/yyyy) : ";
//
// pnlEvento
//
this.pnlEvento.BackColor = System.Drawing.SystemColors.Control;
this.pnlEvento.Controls.Add(this.grpEvento);
this.pnlEvento.Cursor = System.Windows.Forms.Cursors.Hand;
this.pnlEvento.Dock = System.Windows.Forms.DockStyle.Fill;
this.pnlEvento.Location = new System.Drawing.Point(0, 0);
this.pnlEvento.Name = "pnlEvento";
this.pnlEvento.Size = new System.Drawing.Size(710, 240);
this.pnlEvento.TabIndex = 3;
//
// GestioneEvento
//
this.Controls.Add(this.pnlEvento);
this.Name = "GestioneEvento";
this.Size = new System.Drawing.Size(710, 240);
this.grpEvento.ResumeLayout(false);
this.pnlEvento.ResumeLayout(false);
this.ResumeLayout(false);

}
#endregion

public Boolean validaGestione1()
{
return true;
}
}
}


dopo ho aggiunto in usercontrol così fatto:
using System;
using System.Collections;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Windows.Forms;
using torreEventi.Tag;

namespace torreEventi.PannelloControllo
{
/// <summary>
/// Summary description for GestioneEvento.
/// </summary>
public class GestioneEvento : System.Windows.Forms.UserControl
{
private torreEventi.Tag.textData txtData;
private System.Windows.Forms.ErrorProvider errGestioneEvento;
private System.Windows.Forms.GroupBox grpEvento;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label lblData;
private System.Windows.Forms.Panel pnlEvento;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;

public GestioneEvento()
{
// This call is required by the Windows.Forms Form Designer.
InitializeComponent();

// TODO: Add any initialization after the InitializeComponent call
}

/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}

#region Component 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()
{
components = new System.ComponentModel.Container();
this.txtData = new torreEventi.Tag.textData();
this.errGestioneEvento = new System.Windows.Forms.ErrorProvider();
this.grpEvento = new System.Windows.Forms.GroupBox();
this.label2 = new System.Windows.Forms.Label();
this.lblData = new System.Windows.Forms.Label();
this.pnlEvento = new System.Windows.Forms.Panel();
this.grpEvento.SuspendLayout();
this.pnlEvento.SuspendLayout();
this.SuspendLayout();
//
// txtData
//
this.txtData.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txtData.Location = new System.Drawing.Point(126, 37);
this.txtData.Name = "txtData";
this.txtData.TabIndex = 1;
this.txtData.Text = "";
this.txtData.SuspendLayout();
//
// errGestioneEvento
//
this.errGestioneEvento.ContainerControl = this;
//
// grpEvento
//
this.grpEvento.Controls.Add(this.label2);
this.grpEvento.Controls.Add(this.lblData);
this.grpEvento.Cursor = System.Windows.Forms.Cursors.Hand;
this.grpEvento.Dock = System.Windows.Forms.DockStyle.Fill;
this.grpEvento.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.grpEvento.Location = new System.Drawing.Point(0, 0);
this.grpEvento.Name = "grpEvento";
this.grpEvento.Size = new System.Drawing.Size(710, 240);
this.grpEvento.TabIndex = 4;
this.grpEvento.TabStop = false;
this.grpEvento.Text = " Gestione Evento ";
//
// label2
//
this.label2.Cursor = System.Windows.Forms.Cursors.Default;
this.label2.Location = new System.Drawing.Point(16, 80);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(80, 15);
this.label2.TabIndex = 1;
this.label2.Text = "Descrizione :";
//
// lblData
//
this.lblData.Cursor = System.Windows.Forms.Cursors.Default;
this.lblData.Location = new System.Drawing.Point(16, 37);
this.lblData.Name = "lblData";
this.lblData.Size = new System.Drawing.Size(112, 15);
this.lblData.TabIndex = 0;
this.lblData.Text = "Data (gg/mm/yyyy) : ";
//
// pnlEvento
//
this.pnlEvento.BackColor = System.Drawing.SystemColors.Control;
this.pnlEvento.Controls.Add(this.grpEvento);
this.pnlEvento.Cursor = System.Windows.Forms.Cursors.Hand;
this.pnlEvento.Dock = System.Windows.Forms.DockStyle.Fill;
this.pnlEvento.Location = new System.Drawing.Point(0, 0);
this.pnlEvento.Name = "pnlEvento";
this.pnlEvento.Size = new System.Drawing.Size(710, 240);
this.pnlEvento.TabIndex = 3;
//
// GestioneEvento
//
this.Controls.Add(this.pnlEvento);
this.Name = "GestioneEvento";
this.Size = new System.Drawing.Size(710, 240);
this.grpEvento.ResumeLayout(false);
this.pnlEvento.ResumeLayout(false);
this.ResumeLayout(false);

}
#endregion

public Boolean validaGestione1()
{
return true;
}
}
}

il problema è che quando vado a vedere il designer della mia usercontrol, non mi disegna la classe da create che eredità da una normalissima textbox, e non me la fa vedere nemmeno in esecuzione.

Sapete aiutarmi?
grazie a tutti

Torna al forum | Feed RSS

ASPItalia.com non è responsabile per il contenuto dei messaggi presenti su questo servizio, non avendo nessun controllo sui messaggi postati nei propri forum, che rappresentano l'espressione del pensiero degli autori.