/// <summary> /// /// </summary> /// <param name="Index"></param> public void WaitCursor(bool Wait) { // InvokeRequired required compares the thread ID of the // calling thread to the thread ID of the creating thread. // If these threads are different, it returns true. if (this.InvokeRequired) { SetWaitCursorCallback d = new SetWaitCursorCallback(WaitCursor); this.Invoke(d, new object[] { Wait }); } else { // enable or disable the wait cursor if (Wait) { this.Cursor = Cursors.WaitCursor; } else { this.Cursor = Cursors.Default; } } }