Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

interesting error: new form has black line across it, how do I get rid of it

I was creating a new form and my IDE crashed, or it was having problems, and now every time I create a new form it has a black line across it. The black line is not something I was adding, it appears to be the black line from the top of the form getting painted in the wrong place. The interesting thing is that every time I reload the form the line moves up until after the 5th load it disappears. How do I stop this happening? I have tried build, rebuild, clean solution (restart visual studio) but it is still there, it isn't consistent either which also annoying, any ideas?

screenshot of form with black line through it

like image 842
flavour404 Avatar asked Nov 14 '22 07:11

flavour404


1 Answers

The way the line appears overtop of the window (it goes over the border) makes it look like it's probably outside of the Designer-generated code.

Some exploratory coding:

  1. Make a backup!
  2. Try commenting out as much code-behind as possible. Test if it recurs with only the designer-generated code.
    • if it doesn't, then slowly uncomment your code-behind. The highest-risk code is anything that either directly manipulates the Graphics system.
    • if it does, then try commenting out different control declarations until it goes away (you'll be tweaking generated code, so this is where a good backup is critical)

To help test, can you comment out any code-behind so that it's only the Designer-generated code and see if it still occurs?

like image 118
STW Avatar answered Dec 24 '22 04:12

STW