コード例 #1
0
 private void Set_This_Value()
 {
     // 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.
     try
     {
         if (this.InvokeRequired)
         {
             SetCursorValueCallback d = new SetCursorValueCallback(Set_Cursor_Value);
             this.Invoke(d);
         }
         else
         {
             this.Refresh();
             this.Invalidate();
             this.DestroyHandle();
         }
     }
     catch { }
 }
コード例 #2
0
 private void Set_Cursor_Value(string v)
 {
     // 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.
     try
     {
         if (this.InvokeRequired)
         {
             SetCursorValueCallback d = new SetCursorValueCallback(Set_Cursor_Value);
             this.Invoke(d, new object[] { v });
         }
         else
         {
             switch (v)
             {
                 case "WaitCursor": this.Cursor = Cursors.WaitCursor;
                     break;
                 case "Default": this.Cursor = Cursors.Default;
                     break;
                 default: this.Cursor = Cursors.Default;
                     break;
             }
         }
     }
     catch { }
 }