|Just to add to what Richard has said...
When you create a form, all the "heavy lifting" of creating controls, setting form properties, and suchlike is performed for you in the
MyFile.Designer.cs file method
InitializeComponent, which is why the default Form file always contains a constructor which calls it as the first line of code.
This file is created and maintained by the VS designer and isn't normally edited directly.
If you don't call
InitializeComponent when you edit the Form constructor, then no controls or properties are ever created for you, and the variables allocated by the designed for them will remain empty - they will contain the default value for a reference value:
So when your code tries to use them for anything at all, you will get a null reference error, as you have seen.
To be honest, you should have spotted that yourself, and thirty seconds with the debugger would have put you on the right track pretty much immediately! It's worth getting used to the debugger, it's your best friend and will save you hours of hair pulling frustration!
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!