I've noticed two unusual issues with Windows Forms user-controls in Visual Basic and was wondering if there was a workaround for either of these:
You don't seem to be able to place a user-control in a namespace other than the project's root namespace. When you add the namespace to the class file you receive the error:
The class UserControl1 can be designed, but is not the first class in the file. Visual Studio requires that designers use the first class in the file. Move the class code so that it is the first class in the file and try loading the designer again.
I assume this is because the partial class is in a different namespace, is there a way to influence what namespace is used for the partial class
You can't have a user-control inherit from another class, even if that class inherits from UserControl. Your receive the error:
Base class 'Test' specified for class 'UserControl1' cannot be different from the base class 'System.Windows.Forms.UserControl' of one of its other partial types. C:\Devel\WindowsApplication1\WindowsApplication1\Editors\UserControl1.vb 2 14 WindowsApplication1
This makes it very ugly to share non-visual functionality between a group of user-controls.

User Control Inheritance and Namespaces
Art Vandolay Jr.
Elham Sarikhani
I Mrus
Bilberry71
Ah... indeed. VB.NET ignores the folder structure. I wonder if it's a bug or it's by design. So it seems you will need to manually adjust the namespaces for both the code file and designer file.
Daudi
ascanio
Jonas.S
Normally namespaces should follow the directory structure so if you have ProjectX with the default ProjectX namespace adding a form in a folder called FolderY would result in the form using the namespace ProjectX.FolderY.
If you still need to specify your own namespace then you need to modify designer generated file to be in the same namespace. To do this press the second button in the toolbar above the solution explorer tree (the tooltip of that button says "Show all files". This will allow you to see the designer generated file in the solution explorer so you can open it and add your namespace.
Same thing for inheritance. You need to edit the designer generated file to also inherit from your base class.
Given the fact that usually is not recommended to modify the designer generated file perhaps it's better to use folders to put forms in different namespaces and use the Inherited User Control template when you want to create a new user control that inherits from another class than UserControl.