Cor....Sorry if I offended you somehow or broke the forum rules. I thought
these were two seperate issues. One to add a control to a different form and
one to delete a specific control. Sorry man. As far as reposting things you
suggested before, you need to realize that your an extremely advanced user
and some of the suggestions you post are just way above my ability to
understand.
Later,
John
"Cor Ligthert" <no**********@planet.nl> wrote in message
news:OD**************@tk2msftngp13.phx.gbl...
John,
You are almost impossible to help.
You put a message in this newsgroup and than start making another one and
people have no time even to answer you and you even do not look to those
answers you get than.
That was the reason I stopped with it, and I think I do this again.
In this case are you creating a new object instance of form1 what never is
showed.
Cor
"jcrouse" <me> schreef in bericht
news:%2******************@TK2MSFTNGP09.phx.gbl... Didn't help!
"Jorge" <an*******@discussions.microsoft.com> wrote in message
news:87****************************@phx.gbl... Hi John
Maybe frm1.Refresh after adding the control.
Kind Regards
Jorge
>-----Original Message-----
>I want to add controls (labels) at runtime to a
different form. Here is the
>code that is being is under a button on form2:
>
> Dim frm1 As New Form1
> Dim MyLabel As New Label
> MyLabel.BackColor = BackColor.Black
> MyLabel.ForeColor = ForeColor.White
> MyLabel.Text = intTopCounter.ToString
> MyLabel.TextAlign = ContentAlignment.MiddleCenter
> MyLabel.Top = intTopCounter
> MyLabel.ContextMenu = frm1.cmnuLabels
> MyLabel.Left = 40
> MyLabel.Visible = True
> intTopCounter = intTopCounter + 30
> frm1.Controls.Add(MyLabel)
>
>However, the labels never show up. What am I missing
here.
>
>Thanks,
>John
>
>
>.
>