I am having all sorts of trouble with a custom control.
All I wanted was a DGV that treated the Enter key as if it were the Tab key.
I followed an article on how to do it and ended up with the CustomDGV in the Solution Explorer and it appeared in the ToolBox also.
I was then able to use it in my project and all seemed fine.
Now it has become a problem because it won't show in the Toolbox and my project is full of errors because of this.
All I have done with the original project since the last time it ran correctly was remove some buttons from a few forms and add a few new ones, rearrange a few controls to make it neater, no code was altered, but now it has this error and won't work anymore.
I have tried resetting the ToolBox which used to work but now it just won't do a thing. I can't rebuild the project because it sees the errors and says to fix these first yet this seems to be the only way to get it back.
Do I have to remove all instances of the customDGV and any reference to it then go through the process of putting them all back just to get the project to work so I can continue creating it?
This happens regularly, sometimes 2 or 3 times each day that I choose to work on it and I have lost hours of work because I have to revert back to a copy that I made then try to get that copy upto date with the one that doesn't work anymore.
I just tried a new project and followed the instructions on
https://learn.microsoft.com/en-us/dotnet/desktop/winforms/controls/how-to-inherit-from-existing-windows-forms-controls?view=netframeworkdesktop-4.8
with a similar result, the custom control appears in the Solution Explorer but won't show in the ToolBox, at least not for a while. I added an existing control to this project which was my customDGV taken from my project that won't work anymore and it ended up in the toolbox of this new project but the customDGV still won't appear in the toolbox of the original project.
Does anybody know how to stop this from happening?
Could this be a problem with Windows 11? I only ask because for the last six months or so I have been having trouble with Windows crashing, blue screen, black screen, restarting for no reason or blank screen like a tv with snow and nothing works.