Do you mean you have created your own forms designer? All those code gens
"Greg Robinson" <greg@cds-am.net> wrote in message
news:O3gMO$4PFHA.688@TK2MSFTNGP10.phx.gbl...
> We have developed our own custom designer. We have a custom control that
> uses this designer. We have everything working, except.........
>
> How do we get the IDE to recognize a drag and drop from the toolbox such
> that it generates code to add the control to the container's controls
> collection?
>
> Fo example, if I add a tabcontrol to a form, add 2 tabpages to it and then
> drag a textbox onto the first tabpage, I see the following generated code:
>
> <System.Diagnostics.DebuggerStepThrough()> Private Sub
>
> InitializeComponent()
>
> Me.TabControl1 = New System.Windows.Forms.TabControl
>
> Me.TabPage1 = New System.Windows.Forms.TabPage
>
> Me.TabPage2 = New System.Windows.Forms.TabPage
>
> Me.TextBox1 = New System.Windows.Forms.TextBox
>
> Me.TabControl1.SuspendLayout()
>
> Me.TabPage1.SuspendLayout()
>
> Me.SuspendLayout()
>
> '
>
> 'TabControl1
>
> '
>
> Me.TabControl1.Controls.Add(Me.TabPage1)
>
> Me.TabControl1.Controls.Add(Me.TabPage2)
>
> Me.TabControl1.Location = New System.Drawing.Point(72, 104)
>
> Me.TabControl1.Name = "TabControl1"
>
> Me.TabControl1.SelectedIndex = 0
>
> Me.TabControl1.TabIndex = 0
>
> '
>
> 'TabPage1
>
> '
>
> Me.TabPage1.Controls.Add(Me.TextBox1)
>
> Me.TabPage1.Location = New System.Drawing.Point(4, 22)
>
> Me.TabPage1.Name = "TabPage1"
>
> Me.TabPage1.Size = New System.Drawing.Size(192, 74)
>
> Me.TabPage1.TabIndex = 0
>
> Me.TabPage1.Text = "TabPage1"
>
> '
>
> 'TabPage2
>
> '
>
> Me.TabPage2.Location = New System.Drawing.Point(4, 22)
>
> Me.TabPage2.Name = "TabPage2"
>
> Me.TabPage2.Size = New System.Drawing.Size(192, 74)
>
> Me.TabPage2.TabIndex = 1
>
> Me.TabPage2.Text = "TabPage2"
>
> '
>
> 'TextBox1
>
> '
>
> Me.TextBox1.Location = New System.Drawing.Point(56, 24)
>
> Me.TextBox1.Name = "TextBox1"
>
> Me.TextBox1.TabIndex = 0
>
> Me.TextBox1.Text = "TextBox1"
>
> '
>
> 'Form1
>
> '
>
> Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
>
> Me.ClientSize = New System.Drawing.Size(292, 266)
>
> Me.Controls.Add(Me.TabControl1)
>
> Me.Name = "Form1"
>
> Me.Text = "Form1"
>
> Me.TabControl1.ResumeLayout(False)
>
> Me.TabPage1.ResumeLayout(False)
>
> Me.ResumeLayout(False)
>
> End Sub
>
>
>
> What in the designer generated this
>
> Me.TabPage1.Controls.Add(Me.TextBox1)
>
> code?
>
>
>
> Greg Robinson
>
> Custom Data Systems, Inc.
>
>
www.cds-am.net >
>