I removed everything except the namespace/class which restored the Designer window. Then I pasted all content again and got the Designer error back. So far so good. After some structured removing and restoring of data, the problem was a method which ended with
Code: Select all
End Method checkBoxAttachment_CheckedChanged
First I thought it was because there were 2 RETURNS in the same method (with only some commented code in between, hence the issue). Not sure if that could be a problem in another situation and if the compiler should catch that? But it could be a good idea if the compiler could catch an END METHOD followed by uncommented code, as Visual Studio's (2019) Winforms Designer has a problem with it. And apparantly, only in a later update (of VS or X#); the same code works perfectly in the mentioned older versions of VS/X#.
Anyhow, thanks for helping me find the issue and I hope it helps you too!
Dick