1) take Alan's advice, and vote his solution up
2) if you use 'Close the way shown in your code, it will shut down the WinForm app.
3) if what you want to do is remove a specific Row, that requires a rather complex technique (imho, a design flaw of the TableLayoutPanel): it cannot be done by just removing a specific RowStyle !
3a) this thread on SO shows solutions, and discusses the issues: [^
3b) if you have removed all its Controls, you can Hide a RowStyle by setting its 'Height to #0, but, then, other rows may resize in a way you don't want/like.
If you want to remove a Row with other Rows below it, things get hairy :)
Because a TableLayout Panel does not support data binding, if your app frequently edits/changes Rows or Columns with Controls, you may want to use a Control like a DataGridView that can be bound to a DataTable.