You can do this in your button. For obvious reasons you cannot rely on the WindowState in your button, because it can only be clicked when the window is no minimized to tray anyway.
private void button1_Click(object sender, EventArgs e)
{
notifyIcon1.BalloonTipTitle = "Minimize to Tray App";
notifyIcon1.BalloonTipText = "You have successfully minimized your form.";
notifyIcon1.Visible = true;
notifyIcon1.ShowBalloonTip(500);
this.Hide();
}
This should work to "minimize" to tray. Although it should really be called hide-on-button-click-to-tray.