private void chkEnabled_CheckedChanged(object sender, EventArgs e) { if (chkEnabled.Checked) { enabled = true; touchPad.ExclusiveCapture = true; formShowRegion = new FormShowRegion(); formShowRegion.SetLocationAndSize(region); formShowRegion.Show(); } else { enabled = false; touchPad.ExclusiveCapture = false; formShowRegion.Close(); formShowRegion.Dispose(); formShowRegion = null; } }