Changin container of a control

  • Thread starter Thread starter Young
  • Start date Start date
Y

Young

I loaded a button at run time and this button correspond to a text box.

The textbox can be on a form or a panel control.

In VB6, I can do this to make the button's container the same as the textbox
without worrying about whether the textbox is on a panel or a form:

mybutton.container = mytxt.container.

Can someone please tell me how I can do the same in VB.Net
 
In VB6, I can do this to make the button's container the same as the
textbox without worrying about whether the textbox is on a panel or a
form:

mybutton.container = mytxt.container.

Can someone please tell me how I can do the same in VB.Net

Have you looked at 'getcontainercontrol'?

Dale
 
I loaded a button at run time and this button correspond to a text box.

The textbox can be on a form or a panel control.

In VB6, I can do this to make the button's container the same as the textbox
without worrying about whether the textbox is on a panel or a form:

mybutton.container = mytxt.container.

Can someone please tell me how I can do the same in VB.Net

mybutton.Parent = mytxt.Parent
 
Back
Top