Thank you for response,
This is just demonstration of the problem
Do EXACTLY those steps (including complation) and while compiling second
time LEAVE ON Design time of usercontrol2. You'll see that the button is
disappears...
I have something similar.
I have a control in a .NET dll, then my application uses that .NET dll.
IF if change something to the control in the dll, then this control
dissapears in my main form.
(It gets deleted from my auto generated code). So I have to restore a backed
up project.
I know the reason, it somehow loses track of the dll with the modified
control since I just recompiled it.
Probably because the recompiled version have a different version number and
the VS Toolbox doesn't find it anymore.
I have learned that when I discover that my controls are lost on my main
for, then I close VS without saving, and reopen it again.
I can also reduce the problem by closing the VS immediate after rebuilding
the control in the dll, and then start upVS again, so it can load the newer
version.
This problem also existed in Delphi, the wrong component library loaded, and
the control dissapeared from the main form.
Only setting back the zipped file would fix this.
So I always zip my project before I modify visual controls.