UserControl Appearance in Panel

allimbued

Member
Joined
Feb 23, 2012
Messages
11
Programming Experience
Beginner
I 'am trying to do the same, which is add the usercontrol (usrNewMenu) to a panel (pnlFrmArea). So I create an instance of the usrNewMenu called usrNewMenu_obj and then add this object to the main form and then the main form's panel, pnlFrmArea using the following commands:
Me.Controls.Add(usrNewMenu_obj)
pnlFrmArea.Controls.Add(usrMenu_obj)
usrNewMenu_obj.BringToFront()

The backcolor of the usrMenu_obj and the color of the Font of all the controls change to assume the color of the container panel. But this does not happen when the uusrNewMenu_obj is added to the control list of only the Base form (Me.Controls.Add(usrNewMenu_obj) ).
Why does this happen?
Kindly help.
 
Back
Top