This is very frustrating. I had already tried changing
the panel's modifier to protected (I haven't tried public
yet), but it didn't work. The control seemed to be
placed on the panel as a child, but when I debugged the
project, I ended up getting an error (something like):
'The control is not a child of ...'
This was apparently caused by the fact that the Windows
Code generator added only the following lines to the
inherited form's code:
Friend WithEvents TabItemRecord1 As
DEPEQControlLibrary.tabItemRecord
<System.Diagnostics.DebuggerStepThrough()> Private
Sub InitializeComponent()
Me.pnlInfo.Controls.SetChildIndex
(Me.TabItemRecord1, 0)
Note that it never added anything like:
me.pnlInfo.Controls.Add(Me.TabItemRecord1).
Anyway, this was YESTERDAY. Today, after making NO
CHANGES to the ancestor form or the UserControl, I simply
opened the project, added a new inherited form, and
placed a UserControl on it, and it worked fine. What is
going on?