public static void SetEnabled(this Control control, bool enabled) { control.Enabled = enabled; if (enabled) { control.Cursor = Cursors.Default; } else { control.Cursor = Cursors.WaitCursor; } }