Arranging Buttons on a Process Enumerating Application
What will happen when there are more processes than you can fit buttons for on your form?

You're doing the hard work by hand, reinventing a wheel that's already there for you... and as you saw, it's not exactly scaling very well.

The wheel in question is called a FlowLayoutPanel, a winforms layout control that automatically handles control positioning for you, taking overflowing controls to a new row or column, depending on how you configured it - it even handles scrollbars for you, if you have more items than can fit into the panel.



That said, your wheel has a number of squeaky parts:


if (process.ButtonText == "") continue;




Comparing a string against an empty string, would usually be written like this:

if (string.IsNullOrWhiteSpace(process.ButtonText)
{
    continue;
}

In all versions/attempts of your layout code, you hard-coded the key values.


140 / the column width, should be computed from the width of a button
7 is arbitrary and should be allowed to change if/when the form is maximized or resized. Your screenshots crop the top part, but if you haven't removed the min/maximize buttons and allow resizing of the form, the user can easily wreck your layout; it doesn't take the button height into consideration either.





BUG?

It's a little beyond the scope of this review, but this line can potentially blow everything up:


button.Click += (x, y) =&gt; process.Kill();



There's a chance your application will not-so-graciously crash and burn if you bring up your app, then start task manager and kill a process, and then click the button for that process in your app.

The process to kill won't exist anymore, and if ProcessHelper.Kill() doesn't handle that situation, boom! Make sure your wrapper wraps the operation in a try..catch block.