/// <summary> /// Initiate Attach class, and start timerAttach to attach to next clicked window /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void checkBoxAttach_CheckedChanged(object sender, EventArgs e) { attach = new Attach(); if (checkBoxAttach.Checked) { previousSize = Size; previousLocation = Location; } else { FormMain_Resize(null, e); Size = previousSize; Location = previousLocation; } timerAttach.Enabled = checkBoxAttach.Checked; }