Visual Studio and problems with custom controls

Pacher Frank, Asendia Germany 1 Reputation point
2022-11-23T21:47:28.217+00:00

Hello @all ,

to first: sorry for my bad english !
And now to my problem:
I have for some time with VisualStudio 2019 the following problem:
In a project have custom controls.
For example, a custom button that inherited from System.Windows.Forms.

    Public Class clsButton  
                    Inherits System.Windows.Controls.Button  

or

Public Class clsMasterForm  
                    Inherits System.Windows.Forms.Form  

Everything works, the "new" button works great, the new properties are active and can be used without any problems.
Suddenly, from one close of the project to the next open, VS2019 can't find the new controls.
Also from the toolbox (for WinForms) these controls have disappeared.

If I now exclude these controls from the project, and after a VS2019 restart, add them back to the project, everything works again. The controls are in the toolbox until the next time. Without that I can see any pattern/regularity.
(Environment: W10 current patch level, VS2019 current patch level, 64 GB memory, in an ADS).

Do any of you know what is happening here ? As I said it is rare and sporadic.
I also had this under VS2010 (on W7 PC).
Oh well, with VS2022 I could not test yet if it occurs there too.

Thanks a lot
SH

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,878 questions
{count} votes